Update of /cvsroot/wxlua/wxLua/modules/wxlua/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21901/wxLua/modules/wxlua/src
Modified Files:
wxlbind.cpp
Log Message:
code cleanup
add %wxchkver_x_y_z as replacement for %wxchkverxyz
Index: wxlbind.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** wxlbind.cpp 2 Oct 2006 21:19:24 -0000 1.40
--- wxlbind.cpp 6 Nov 2006 06:11:44 -0000 1.41
***************
*** 33,36 ****
--- 33,37 ----
// represents prototypes argument types
//
+ int s_wxluaarg_None = 0;
int s_wxluaarg_String = -2;
int s_wxluaarg_Boolean = -3;
***************
*** 47,68 ****
// wxLuaObject
//-----------------------------------------------------------------------------
! IMPLEMENT_DYNAMIC_CLASS(wxLuaObject, wxObject)
!
! wxLuaObject::wxLuaObject()
! : m_wxlState(NULL), m_iReference(LUA_NOREF),
! m_bool(false), m_int(0), m_alloc_flags(wxLUAOBJECT_NONE)
! {
! m_wxlState = new wxLuaState(false); // always created even if invalid
! }
!
! wxLuaObject::wxLuaObject(lua_State *L, int iParam, int WXUNUSED(iRef))
! : m_wxlState(NULL),
! m_bool(false), m_int(0), m_alloc_flags(wxLUAOBJECT_NONE)
! {
! m_wxlState = new wxLuaState(L);
! m_iReference = m_wxlState->tinsert(iParam);
! }
! wxLuaObject::wxLuaObject(const wxLuaState& wxlState, int iParam, int WXUNUSED(iRef))
: m_wxlState(NULL),
m_bool(false), m_int(0), m_alloc_flags(wxLUAOBJECT_NONE)
--- 48,54 ----
// wxLuaObject
//-----------------------------------------------------------------------------
! IMPLEMENT_ABSTRACT_CLASS(wxLuaObject, wxObject)
! wxLuaObject::wxLuaObject(const wxLuaState& wxlState, int iParam)
: m_wxlState(NULL),
m_bool(false), m_int(0), m_alloc_flags(wxLUAOBJECT_NONE)
***************
*** 91,106 ****
}
! void wxLuaObject::ModifyAllocationFlags(int iValue)
{
! // FIXME - who uses and knows how to use this?
! if (iValue & 1) m_alloc_flags &= (~wxLUAOBJECT_BOOL);
! if (iValue & 2) m_alloc_flags &= (~wxLUAOBJECT_INT);
! if (iValue & 4) m_alloc_flags &= (~wxLUAOBJECT_STRING);
! if (iValue & 8) m_alloc_flags &= (~wxLUAOBJECT_ARRAYINT);
! if (iValue & 16) m_alloc_flags |= wxLUAOBJECT_BOOL;
! if (iValue & 32) m_alloc_flags |= wxLUAOBJECT_INT;
! if (iValue & 64) m_alloc_flags |= wxLUAOBJECT_STRING;
! if (iValue & 128) m_alloc_flags |= wxLUAOBJECT_ARRAYINT;
}
--- 77,88 ----
}
! int wxLuaObject::SetAllocationFlag(wxLuaObject_Type flag, bool set)
{
! if (set)
! m_alloc_flags |= flag;
! else
! m_alloc_flags &= (~ int(flag));
! return m_alloc_flags;
}
***************
*** 141,151 ****
}
- void wxLuaObject::SetObject(lua_State *L, int iParam)
- {
- wxCHECK_RET(L, wxT("Invalid lua_State"));
- m_wxlState->Create(L);
- SetObject(iParam);
- }
-
void wxLuaObject::SetObject(int iParam)
{
--- 123,126 ----
|