static int NSTime_get_nsecs(lua_State* L) { NSTime time = toNSTime(L,1); lua_pushnumber (L,(lua_Number)(time->nsecs)); return 1; }
static int NSTime_set_nsecs(lua_State* L) { NSTime time = toNSTime(L,1); int nsecs = luaL_checkint(L,3); time->nsecs = nsecs; return 0; }
/* Gets registered as metamethod automatically by WSLUA_REGISTER_CLASS/META */ static int NSTime__gc(lua_State* L) { NSTime nstime = toNSTime(L,1); if (!nstime) return 0; g_free (nstime); return 0; }
static int NSTime_set_secs(lua_State* L) { NSTime nstime = toNSTime(L,1); time_t secs = luaL_checkint(L,3); nstime->secs = secs; return 0; }