void tLuaCOMEnumerator::push(lua_State* L) { LUASTACK_SET(L); // creates table lua_newtable(L); luaCompat_pushTypeByName(L, tLuaCOMEnumerator::module_name, tLuaCOMEnumerator::type_name); luaCompat_setType(L, -2); lua_pushstring(L, ENUMERATOR_FIELD); // pushes typed pointer luaCompat_pushTypeByName(L, tLuaCOMEnumerator::module_name, tLuaCOMEnumerator::pointer_type_name); luaCompat_newTypedObject(L, this); // stores in the table lua_settable(L, -3); LUASTACK_CLEAN(L, 1); }
int tLuaObject::generic_PushNew(lua_State* L, tLuaObject* lua_obj, const char* type_name, const char* pointer_type_name ) { LUASTACK_SET(L); // creates table lua_newtable(L); luaCompat_pushTypeByName(L, MODULENAME, type_name); luaCompat_setType(L, -2); lua_pushstring(L, TLUAOBJECT_POINTER_FIELD); // pushes typed pointer luaCompat_pushTypeByName(L, MODULENAME, pointer_type_name); luaCompat_newTypedObject(L, lua_obj); // stores in the table lua_settable(L, -3); LUASTACK_CLEAN(L, 1); return 1; }
void tLuaCOMConnPoint::push() { LUASTACK_SET(L); lua_newtable(L); luaCompat_pushTypeByName(L, MODULENAME, LCOM_CONNPOINT_TYPENAME); luaCompat_setType(L, -2); lua_pushstring(L, CONNPOINT_NAME); luaCompat_pushPointer(L, this); lua_settable(L, -3); LUASTACK_CLEAN(L, 1); }
void LuaBeans::push(lua_State* L, void* userdata ) { LUASTACK_SET(L); lua_newtable(L); lua_pushstring(L, "_USERDATA_REF_"); luaCompat_pushTypeByName(L, module_name, udtag_name); luaCompat_newTypedObject(L, userdata); lua_settable(L, -3); luaCompat_pushTypeByName(L, module_name, tag_name); luaCompat_setType(L, -2); LUASTACK_CLEAN(L, 1); }
void LuaBeans::push( void* userdata ) { LUASTACK_SET(L); lua_newtable(L); lua_pushstring(L, "_USERDATA_REF_"); luaCompat_pushTypeByName(L, module_name, udtag_name); luaCompat_newTypedObject(L, userdata); lua_settable(L, -3); if (this->mlist) register_methods(L, -1, this->mlist->table, this->mlist->n); luaCompat_pushTypeByName(L, module_name, tag_name); luaCompat_setType(L, -2); LUASTACK_CLEAN(L, 1); }