From 6ed1bcd41bc61adb40738d0052c985184dbff1b0 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 18 Oct 2016 00:20:28 +1100 Subject: [PATCH] cfileio: fix function typedefs to have struct/enum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise building with cfileio.h would result in: /usr/include/assimp/cfileio.h:61:58: error: unknown type name ‘aiOrigin’ typedef aiReturn (*aiFileSeek)(C_STRUCT aiFile*, size_t, aiOrigin); ^~~~~~~~ /usr/include/assimp/cfileio.h:64:9: error: unknown type name ‘aiFile’ typedef aiFile* (*aiFileOpenProc) (C_STRUCT aiFileIO*, const char*, const char*); ^~~~~~ /usr/include/assimp/cfileio.h:122:5: error: unknown type name ‘aiFileSeek’ aiFileSeek SeekProc; ^~~~~~~~~~ --- include/assimp/cfileio.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/assimp/cfileio.h b/include/assimp/cfileio.h index f9f121207..5f46f7c4c 100644 --- a/include/assimp/cfileio.h +++ b/include/assimp/cfileio.h @@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_FILEIO_H_INC #define AI_FILEIO_H_INC -#include "types.h" +#include #ifdef __cplusplus extern "C" { #endif @@ -54,15 +54,15 @@ struct aiFileIO; struct aiFile; // aiFile callbacks -typedef size_t (*aiFileWriteProc) (C_STRUCT aiFile*, const char*, size_t, size_t); -typedef size_t (*aiFileReadProc) (C_STRUCT aiFile*, char*, size_t,size_t); -typedef size_t (*aiFileTellProc) (C_STRUCT aiFile*); -typedef void (*aiFileFlushProc) (C_STRUCT aiFile*); -typedef aiReturn (*aiFileSeek)(C_STRUCT aiFile*, size_t, aiOrigin); +typedef size_t (*aiFileWriteProc) (C_STRUCT aiFile*, const char*, size_t, size_t); +typedef size_t (*aiFileReadProc) (C_STRUCT aiFile*, char*, size_t,size_t); +typedef size_t (*aiFileTellProc) (C_STRUCT aiFile*); +typedef void (*aiFileFlushProc) (C_STRUCT aiFile*); +typedef C_ENUM aiReturn (*aiFileSeek) (C_STRUCT aiFile*, size_t, C_ENUM aiOrigin); // aiFileIO callbacks -typedef aiFile* (*aiFileOpenProc) (C_STRUCT aiFileIO*, const char*, const char*); -typedef void (*aiFileCloseProc) (C_STRUCT aiFileIO*, C_STRUCT aiFile*); +typedef C_STRUCT aiFile* (*aiFileOpenProc) (C_STRUCT aiFileIO*, const char*, const char*); +typedef void (*aiFileCloseProc) (C_STRUCT aiFileIO*, C_STRUCT aiFile*); // Represents user-defined data typedef char* aiUserData;