Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 14, 2006, 5:24:31 PM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: new Executor construct, that is much more typesafe, faster, and easier to extend…

Also changed the LoadParam process, and adapted ScriptEngine calls

Then at the end, some missing headers appeared, and appended them to all the cc-files again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/script_engine/lunar.h

    r8408 r9727  
    1616  userdataType;
    1717public:
    18   typedef Executor* mfp;
     18  typedef Executor<lua_State*>* mfp;
    1919  typedef struct { const char *name; mfp mfunc; }
    2020  RegType;
     
    184184    lua_remove(L, 1);  // remove self so member function args start at index 1
    185185    // 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;
    190189  }
    191190
Note: See TracChangeset for help on using the changeset viewer.