From: John L. <jr...@us...> - 2005-11-17 05:51:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7199/wxLua/modules/wxlua/src Modified Files: internal.cpp Log Message: update for wx26/27 Add bindings for builtin (global) functions Handle %if statements for enums Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** internal.cpp 18 Jun 2005 20:46:00 -0000 1.3 --- internal.cpp 17 Nov 2005 05:51:20 -0000 1.4 *************** *** 85,93 **** : wxObject(), - m_typesRegistered(false), pfGetClassList(NULL), pfGetDefineList(NULL), pfGetEventList(NULL), pfGetObjectList(NULL), m_classCount(0), m_classList(NULL), --- 85,93 ---- : wxObject(), pfGetClassList(NULL), pfGetDefineList(NULL), pfGetEventList(NULL), pfGetObjectList(NULL), + pfGetBuiltinList(NULL), m_classCount(0), m_classList(NULL), *************** *** 97,101 **** m_eventList(NULL), m_objectCount(0), ! m_objectList(NULL) { } --- 97,107 ---- m_eventList(NULL), m_objectCount(0), ! m_objectList(NULL), ! m_builtinCount(0), ! m_builtinList(NULL), ! m_typesRegistered(false), ! m_startTag(0), ! m_lastTag(0), ! m_wxLuaTable(0) { } *************** *** 210,213 **** --- 216,229 ---- } m_lastTag = iTag; + + // register all the builtin functions + m_builtinList = (*pfGetBuiltinList)(m_builtinCount); + for (size_t iBuiltin= 0; iBuiltin < m_builtinCount; ++iBuiltin) + { + WXLUAMETHOD *pMethod = m_builtinList + iBuiltin; + lua_pushstring(L, pMethod->name); + lua_pushcfunction(L, pMethod->func); + lua_rawset(L, tableOffset); + } // for backward compatibility |