Changeset 9727 in orxonox.OLD for branches/new_class_id/src/lib/script_engine/lunar.h
- Timestamp:
- Sep 14, 2006, 5:24:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/script_engine/lunar.h
r8408 r9727 16 16 userdataType; 17 17 public: 18 typedef Executor * mfp;18 typedef Executor<lua_State*>* mfp; 19 19 typedef struct { const char *name; mfp mfunc; } 20 20 RegType; … … 184 184 lua_remove(L, 1); // remove self so member function args start at index 1 185 185 // get member function from upvalue 186 Executor *l = static_cast<Executor*>(lua_touserdata(L, lua_upvalueindex(1))); 187 int value; 188 (*l)(obj, value, L); // call member function 189 return value; 186 mfp l = static_cast<mfp>(lua_touserdata(L, lua_upvalueindex(1))); 187 (*l)(obj, L); // call member function 188 return l->hasRetVal()? 1 : 0; 190 189 } 191 190
Note: See TracChangeset
for help on using the changeset viewer.