extras/physfs_rb/physfs/rb_physfs.c
changeset 654 c0ae01de361d
parent 514 f4e89d934fee
equal deleted inserted replaced
653:89d56fcb2b40 654:c0ae01de361d
   367  *
   367  *
   368  * return +PhysicsFS::File+ ready for reading
   368  * return +PhysicsFS::File+ ready for reading
   369  */
   369  */
   370 VALUE physfs_open_read (VALUE self, VALUE name)
   370 VALUE physfs_open_read (VALUE self, VALUE name)
   371 {
   371 {
   372     PHYSFS_file *file = PHYSFS_openRead (STR2CSTR(name));
   372     PHYSFS_File *file = PHYSFS_openRead (STR2CSTR(name));
   373     return physfs_file_new (file);
   373     return physfs_file_new (file);
   374 }
   374 }
   375 
   375 
   376 /*
   376 /*
   377  * PhysicsFS::open_write name
   377  * PhysicsFS::open_write name
   378  *
   378  *
   379  * return PhysicsFS::File ready for writing
   379  * return PhysicsFS::File ready for writing
   380  */
   380  */
   381 VALUE physfs_open_write (VALUE self, VALUE name)
   381 VALUE physfs_open_write (VALUE self, VALUE name)
   382 {
   382 {
   383     PHYSFS_file *file = PHYSFS_openWrite (STR2CSTR(name));
   383     PHYSFS_File *file = PHYSFS_openWrite (STR2CSTR(name));
   384     return physfs_file_new (file);
   384     return physfs_file_new (file);
   385 }
   385 }
   386 
   386 
   387 /*
   387 /*
   388  * PhysicsFS::open_append name
   388  * PhysicsFS::open_append name
   389  *
   389  *
   390  * return PhysicsFS::File ready for appending
   390  * return PhysicsFS::File ready for appending
   391  */
   391  */
   392 VALUE physfs_open_append (VALUE self, VALUE name)
   392 VALUE physfs_open_append (VALUE self, VALUE name)
   393 {
   393 {
   394     PHYSFS_file *file = PHYSFS_openAppend (STR2CSTR(name));
   394     PHYSFS_File *file = PHYSFS_openAppend (STR2CSTR(name));
   395     return physfs_file_new (file);
   395     return physfs_file_new (file);
   396 }
   396 }
   397 
   397 
   398 void Init_physfs_so (void)
   398 void Init_physfs_so (void)
   399 {
   399 {