Przeglądaj źródła

Updated SWIG bindings.

Ryan C. Gordon 15 lat temu
rodzic
commit
51a22c576e
2 zmienionych plików z 9 dodań i 1 usunięć
  1. 4 1
      extras/physfs-swig.i
  2. 5 0
      src/physfs.h

+ 4 - 1
extras/physfs-swig.i

@@ -11,6 +11,7 @@
 %ignore _INCLUDE_PHYSFS_H_;  /* ignore the include-once blocker. */
 %ignore PHYSFS_DECL;  /* ignore the export define. */
 %ignore PHYSFS_CALL;  /* ignore the calling conventions define. */
+%ignore PHYSFS_DEPRECATED;  /* ignore the deprecation define. */
 %ignore PHYSFS_file;  /* legacy type define. */
 
 /* Some bindings put everything in a namespace, so we don't need PHYSFS_ */
@@ -85,7 +86,9 @@
 %rename(getMountPoint) PHYSFS_getMountPoint;
 %rename(Stat) PHYSFS_Stat;   /* !!! FIXME: case insensitive script languages? */
 %rename(stat) PHYSFS_stat;
-#endif  /* SWIGPERL */
+%rename(readBytes) PHYSFS_readBytes;
+%rename(writeBytes) PHYSFS_writeBytes;
+#endif
 
 %include "../src/physfs.h"
 

+ 5 - 0
src/physfs.h

@@ -2563,6 +2563,9 @@ typedef struct PHYSFS_Stat
  */
 PHYSFS_DECL int PHYSFS_stat(const char *fname, PHYSFS_Stat *stat);
 
+
+#ifndef SWIG  /* not available from scripting languages. */
+
 /**
  * \fn void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst, PHYSFS_uint64 len)
  * \brief Convert a UTF-16 string to a UTF-8 string.
@@ -2622,6 +2625,8 @@ PHYSFS_DECL void PHYSFS_utf8FromUtf16(const PHYSFS_uint16 *src, char *dst,
 PHYSFS_DECL void PHYSFS_utf8ToUtf16(const char *src, PHYSFS_uint16 *dst,
                                     PHYSFS_uint64 len);
 
+#endif  /* SWIG */
+
 
 /**
  * \fn PHYSFS_sint64 PHYSFS_readBytes(PHYSFS_File *handle, void *buffer, PHYSFS_uint64 len)