Lines Matching defs:metatable

1051   swig_lua_method   *metatable; /* 0 for -eluac */
1275 if(!lua_isnil(L,-1)) /*There is an ordinary metatable */
1330 lua_remove(L,-2); /* stack tidy, remove metatable */
1342 lua_remove(L,-2); /* stack tidy, remove metatable */
1376 lua_pop(L,1); /* remote metatable */
1390 /* There must be namespace table (not metatable) at the top of the stack */
1441 lua_newtable(L); /* metatable for namespace */
1460 lua_setmetatable(L,-2); /* set metatable */
1539 /* Trick: temporarily replacing original metatable with metatable for base class and call getter */
1567 lua_setmetatable(L,subcall_first_arg); /* Set new metatable */
1574 /* Restore original metatable */
1615 lua_remove(L,-2); /* stack tidy, remove metatable */
1620 /* Remove the metatable */
1656 lua_remove(L,-2); /* stack tidy, remove metatable */
1670 lua_remove(L,-2); /* stack tidy, remove metatable */
1676 /* Remove the metatable */
1741 lua_remove(L,substack_start+4); /*remove metatable*/
1757 lua_remove(L,-2); /* stack tidy, remove metatable */
1762 lua_pop(L,1); /* remove metatable */
1823 (1) userdata (not the metatable) */
1936 /* Helper function to get the classes metatable from the register */
1984 /* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
2002 /* There is one parameter - original, i.e. 'derived' class metatable */
2089 /* add methods to the metatable */
2097 This adds methods from metatable array to metatable. Can mess up garbage
2100 if(clss->metatable) {
2101 for(i=0;clss->metatable[i].name;i++) {
2102 SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func);
2118 in metatable and not in object).
2133 * clss is class which metatable we will search for method
2155 lua_remove(L,-2); /* removing class metatable */
2158 lua_pop(L,2); /* remove class metatable and query result */
2209 * if method is defined in the class metatable itself
2222 /* Check whether method is already defined in metatable */
2250 lua_pop(L,1); /* remove base class metatable */
2312 lua_pop(L,1); /* pop class metatable */
2372 lua_newtable(L); /* create the metatable */
2374 /* If squashing is requested, then merges all bases metatable into this one.
2418 lua_rawset(L,-3); /* metatable into registry */
2428 lua_pop(L,1); /* tidy stack (remove class metatable) */
2441 * "MyClass" ----> [MyClass metatable] <===== "MyClass" -+> [static part]
2444 * ".static" --------------)----------------/ [static part metatable]
2454 assert(lua_istable(L,-1)); /* get class static metatable */
2457 SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */
2462 lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */
2463 lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */
2492 assert(clss->metatable);
2493 lua_pushrotable(L, (void*)(clss->metatable)); /* create the metatable */
2504 /* helper to add metatable to new lua object */
2507 if (type->clientdata) /* there is clientdata: so add the metatable */
2534 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2610 SWIG_Lua_AddMetatable(L,type); /* add metatable */