Finally abstracted constants properly. Changed how the event module works; wasn't really abstract before. Removed libs we're not going to use: native, signal.

This commit is contained in:
rude
2009-10-10 11:11:04 +02:00
parent 0a2ae705dd
commit 87e3c4131c
101 changed files with 3225 additions and 33496 deletions
+5 -2
View File
@@ -44,11 +44,14 @@ namespace physfs
int w_File_open(lua_State * L)
{
File * file = luax_checkfile(L, 1);
int mode = luaL_optint(L, 2, File::READ);
File::Mode mode;
if(!File::getConstant(luaL_checkstring(L, 2), mode))
return luaL_error(L, "Incorrect file open mode: %s", luaL_checkstring(L, 2));
try
{
lua_pushboolean(L, file->open((File::Mode)mode) ? 1 : 0);
lua_pushboolean(L, file->open(mode) ? 1 : 0);
}
catch(Exception e)
{