Skip to content

Commit

Permalink
Updated SWIG bindings.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 21, 2010
1 parent 94c621c commit 51a22c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extras/physfs-swig.i
Expand Up @@ -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_ */
Expand Down Expand Up @@ -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 changes: 5 additions & 0 deletions src/physfs.h
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 51a22c5

Please sign in to comment.