From 51a22c576e7586c44151ac0748f3fd3c1e0c49b1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 21 Aug 2010 14:41:51 -0400 Subject: [PATCH] Updated SWIG bindings. --- extras/physfs-swig.i | 5 ++++- src/physfs.h | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/extras/physfs-swig.i b/extras/physfs-swig.i index e5d368f1..354c6a59 100644 --- a/extras/physfs-swig.i +++ b/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" diff --git a/src/physfs.h b/src/physfs.h index 3bb2844c..c3e147ab 100644 --- a/src/physfs.h +++ b/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)