Browse Source

bugfix: fix cexport API for c compilers.

Kim Kulling 11 years ago
parent
commit
fb1c9ab86d
3 changed files with 7 additions and 6 deletions
  1. 3 3
      include/assimp/cexport.h
  2. 2 2
      include/assimp/types.h
  3. 2 1
      test/unit/CCompilerTest.c

+ 3 - 3
include/assimp/cexport.h

@@ -211,10 +211,10 @@ struct aiExportDataBlob
 		extension that should be used when writing 
 		the data to disc.
 	 */
-	aiString name;
+    C_STRUCT aiString name;
 
 	/** Pointer to the next blob in the chain or NULL if there is none. */
-	aiExportDataBlob * next;
+	C_STRUCT aiExportDataBlob * next;
 
 #ifdef __cplusplus
 	/// Default constructor
@@ -247,7 +247,7 @@ ASSIMP_API const C_STRUCT aiExportDataBlob* aiExportSceneToBlob( const C_STRUCT
 * returned by aiExportScene(). 
 * @param pData the data blob returned by #aiExportSceneToBlob
 */
-ASSIMP_API C_STRUCT void aiReleaseExportBlob( const C_STRUCT aiExportDataBlob* pData );
+ASSIMP_API void aiReleaseExportBlob( const C_STRUCT aiExportDataBlob* pData );
 
 #ifdef __cplusplus
 }

+ 2 - 2
include/assimp/types.h

@@ -371,7 +371,7 @@ struct aiString
 /**	Standard return type for some library functions.
  * Rarely used, and if, mostly in the C API.
  */
-enum aiReturn
+typedef enum aiReturn
 {
 	/** Indicates that a function was successful */
 	aiReturn_SUCCESS = 0x0,
@@ -388,7 +388,7 @@ enum aiReturn
 	 *  Force 32-bit size enum
 	 */
 	_AI_ENFORCE_ENUM_SIZE = 0x7fffffff 
-};  // !enum aiReturn
+} aiReturn;  // !enum aiReturn
 
 // just for backwards compatibility, don't use these constants anymore
 #define AI_SUCCESS     aiReturn_SUCCESS

+ 2 - 1
test/unit/CCompilerTest.c

@@ -5,4 +5,5 @@
 #include <assimp/scene.h>
 #include <assimp/version.h>
 #include <assimp/config.h>
-#include <assimp/cimport.h>
+#include <assimp/cimport.h>
+#include <assimp/cexport.h>