X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Ffile-system.cpp;h=afb9f0b95af39dff8979de7ea62a00cce5a13bdc;hb=c59d2be798005a3684d75c3f561568ad2cdac9c7;hp=76892ef7a74ac78a86113ff06659b36b5b996b2d;hpb=12c23d8b50e25efce7891cc81427c5774340bd18;p=guile-irrlicht.git diff --git a/src/file-system.cpp b/src/file-system.cpp index 76892ef..afb9f0b 100644 --- a/src/file-system.cpp +++ b/src/file-system.cpp @@ -24,21 +24,20 @@ #include "file-archive.h" #include "file-system.h" #include "gsubr.h" - +#include "wrapped.h" using namespace irr; - SCM -io_IFileSystem_addFileArchive (SCM file_system, - SCM filename, - SCM ignore_case, - SCM ignore_paths, - SCM archive_type, - SCM password, - SCM ret_archive) +IFileSystem_addFileArchive (SCM file_system, + SCM filename, + SCM ignore_case, + SCM ignore_paths, + SCM archive_type, + SCM password, + SCM ret_archive) { - io::IFileArchive* retArchive = (io::IFileArchive*)scm_to_pointer (ret_archive); + io::IFileArchive* retArchive = (io::IFileArchive*)scm_to_irr_pointer (ret_archive); io::IFileArchive** retArchiveReference = 0; if (retArchive != NULL) { @@ -46,22 +45,17 @@ io_IFileSystem_addFileArchive (SCM file_system, } return scm_from_bool - (((io::IFileSystem*)scm_to_pointer (file_system))-> - addFileArchive (scm_to_utf8_stringn (filename, NULL), + (((io::IFileSystem*)scm_to_irr_pointer (file_system))-> + addFileArchive (scm_to_utf8_string (filename), scm_to_bool (ignore_case), scm_to_bool (ignore_paths), scm_to_file_archive_type (archive_type), - scm_to_utf8_stringn (password, NULL), + scm_to_utf8_string (password), retArchiveReference)); } - -extern "C" { - - void - init_file_system (void) - { - DEFINE_GSUBR ("io_IFileSystem_addFileArchive", 7, 0, 0, io_IFileSystem_addFileArchive); - } - +void +init_file_system (void) +{ + DEFINE_GSUBR ("IFileSystem_addFileArchive", 7, 0, 0, IFileSystem_addFileArchive); }