Update of /cvsroot/wxlua/wxLua/modules/wxlua/include
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10601/wxLua/modules/wxlua/include
Modified Files:
wxlbind.h
Log Message:
Cleanup the change to using positive wxLua types and the mapping between
the Lua and wxLua types.
Fix wxLuaEdit to not stop at -1 line numbers since that's what Lua gives
when running require("wx").
Index: wxlbind.h
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** wxlbind.h 25 Jan 2008 23:50:52 -0000 1.82
--- wxlbind.h 26 Jan 2008 23:27:25 -0000 1.83
***************
*** 55,59 ****
#define WXLUA_T_MIN 0 // Min of the Lua WXLUA_TXXX values
! #define WXLUA_TNULL 13 // C++ NULL, has metatable
// Blindly convert the lua_type to the wxlua_type. Note: WXLUA_TXXX = LUA_TXXX + 2
--- 55,62 ----
#define WXLUA_T_MIN 0 // Min of the Lua WXLUA_TXXX values
! #define WXLUATYPE_NULL 13 // C++ NULL, is full wxLua type with metatable
!
! // Is this wxLua type one of the basic Lua types
! #define WXLUAT_IS_LUAT(wxl_type) (((wxl_type) >= WXLUA_T_MIN) && ((wxl_type) <= WXLUA_T_MAX))
// Blindly convert the lua_type to the wxlua_type. Note: WXLUA_TXXX = LUA_TXXX + 2
***************
*** 64,68 ****
// generic WXLUA_TXXX type. This means that there might be a metatable for
// this type in the wxlua_lreg_types_key of the LUA_REGISTRYINDEX table.
! #define wxlua_iswxuserdatatype(wxl_type) ((wxl_type) >= WXLUA_TNULL)
// Variables used in the wxLuaArgType member of the wxLuaBindCFunc for
--- 67,71 ----
// generic WXLUA_TXXX type. This means that there might be a metatable for
// this type in the wxlua_lreg_types_key of the LUA_REGISTRYINDEX table.
! #define wxlua_iswxuserdatatype(wxl_type) ((wxl_type) > WXLUA_T_MAX)
// Variables used in the wxLuaArgType member of the wxLuaBindCFunc for
***************
*** 82,85 ****
--- 85,91 ----
extern WXDLLIMPEXP_DATA_WXLUA(int) wxluatype_TCFUNCTION;
+ // The NULL wxLua type is not part of the bindings, but is installed
+ // by the wxLuaState since it may be used by various bindings and does not
+ // rely on wxWidgets.
extern WXDLLIMPEXP_DATA_WXLUA(int) wxluatype_NULL; // wxLua type for NULL pointer
extern WXDLLIMPEXP_DATA_WXLUA(wxLuaBindClass) wxLuaBindClass_NULL; // for NULL pointer
***************
*** 345,349 ****
public: \
wxLua_wxObject_##objName(className *p_##objName) : m_p##objName(p_##objName) {} \
! ~wxLua_wxObject_##objName(); \
className *m_p##objName; \
DECLARE_ABSTRACT_CLASS(wxLua_wxObject_##objName) \
--- 351,355 ----
public: \
wxLua_wxObject_##objName(className *p_##objName) : m_p##objName(p_##objName) {} \
! virtual ~wxLua_wxObject_##objName(); \
className *m_p##objName; \
DECLARE_ABSTRACT_CLASS(wxLua_wxObject_##objName) \
|