Update of /cvsroot/wxlua/wxLua/modules/wxlua/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16399/wxLua/modules/wxlua/include
Modified Files:
wxlstate.h
Log Message:
fix for nonunicode wxWidgets builds
Index: wxlstate.h
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** wxlstate.h 7 Dec 2005 05:53:30 -0000 1.9
--- wxlstate.h 8 Dec 2005 16:07:07 -0000 1.10
***************
*** 49,52 ****
--- 49,58 ----
class WXDLLIMPEXP_WXLUA wxLuaStateRefData;
+ #if wxUSE_UNICODE
+ #define wxLUA_UNUSED_NOTUNICODE(x) x
+ #else /* !Unicode */
+ #define wxLUA_UNUSED_NOTUNICODE(x)
+ #endif // wxUSE_UNICODE
+
// ----------------------------------------------------------------------------
// String functions - convert between Lua (ansi string) and wxString (encoded)
***************
*** 333,337 ****
// Raw basic lua stack functions, lua.h
! // FIXME LuaStackObject Stack(int index) { return LuaStackObject(this, index); }
int lua_GetTop();
void lua_SetTop(int index);
--- 339,343 ----
// Raw basic lua stack functions, lua.h
! // FIXME LuaStackObject Stack(int index) { return LuaStackObject(this, index); }
int lua_GetTop();
void lua_SetTop(int index);
***************
*** 376,380 ****
void lua_PushLString(const wxString& s) { lua_PushLString(wx2lua(s), s.Len()); }
void lua_PushString(const char* s);
! void lua_PushString(const wxString& s) { lua_PushString(wx2lua(s)); }
//wxString lua_PushVfString();
//wxString lua_PushFString();
--- 382,386 ----
void lua_PushLString(const wxString& s) { lua_PushLString(wx2lua(s), s.Len()); }
void lua_PushString(const char* s);
! wxLUA_UNUSED_NOTUNICODE(void lua_PushString(const wxString& s) { lua_PushString(wx2lua(s)); })
//wxString lua_PushVfString();
//wxString lua_PushFString();
***************
*** 409,415 ****
int lua_PCall(int nargs, int nresults, int errfunc);
int lua_CPCall(lua_CFunction func, void *ud);
- int lua_Load(lua_Chunkreader reader, void *dt, const wxString& chunkname)
- { return lua_Load(reader, dt, wx2lua(chunkname)); }
int lua_Load(lua_Chunkreader reader, void *dt, const char* chunkname);
int lua_Dump (lua_State *L, lua_Chunkwriter writer, void *data);
--- 415,420 ----
int lua_PCall(int nargs, int nresults, int errfunc);
int lua_CPCall(lua_CFunction func, void *ud);
int lua_Load(lua_Chunkreader reader, void *dt, const char* chunkname);
+ wxLUA_UNUSED_NOTUNICODE(int lua_Load(lua_Chunkreader reader, void *dt, const wxString& chunkname) { return lua_Load(reader, dt, wx2lua(chunkname)); })
int lua_Dump (lua_State *L, lua_Chunkwriter writer, void *data);
***************
*** 443,448 ****
//lua_pop(L,n) lua_settop(L, -(n)-1)
- void lua_Register(const wxString& funcName, lua_CFunction f) { lua_Register(wx2lua(funcName), f); }
void lua_Register(const char* funcName, lua_CFunction f);
void lua_PushCFunction(lua_CFunction f);
--- 448,453 ----
//lua_pop(L,n) lua_settop(L, -(n)-1)
void lua_Register(const char* funcName, lua_CFunction f);
+ wxLUA_UNUSED_NOTUNICODE(void lua_Register(const wxString& funcName, lua_CFunction f) { lua_Register(wx2lua(funcName), f); })
void lua_PushCFunction(lua_CFunction f);
***************
*** 461,466 ****
int lua_GetStack(int level, lua_Debug* ar);
- int lua_GetInfo(const wxString& what, lua_Debug* ar) { return lua_GetInfo(wx2lua(what), ar); }
int lua_GetInfo(const char* what, lua_Debug* ar);
const char* lua_GetLocal(const lua_Debug* ar, int n);
wxString lua_GetLocalwxString(const lua_Debug* ar, int n) { return lua2wx(lua_GetLocal(ar, n)); }
--- 466,471 ----
int lua_GetStack(int level, lua_Debug* ar);
int lua_GetInfo(const char* what, lua_Debug* ar);
+ wxLUA_UNUSED_NOTUNICODE(int lua_GetInfo(const wxString& what, lua_Debug* ar) { return lua_GetInfo(wx2lua(what), ar); })
const char* lua_GetLocal(const lua_Debug* ar, int n);
wxString lua_GetLocalwxString(const lua_Debug* ar, int n) { return lua2wx(lua_GetLocal(ar, n)); }
|