[Olsr-cvs] olsrd-current/lib/tas/src/lua lapi.c, 1.2, 1.3 ldblib.c, 1.2, 1.3 lua.h, 1.2, 1.3
Bernd Petrovitsch
(spam-protected)
Fri Nov 16 23:56:56 CET 2007
Update of /cvsroot/olsrd/olsrd-current/lib/tas/src/lua
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15005/lib/tas/src/lua
Modified Files:
lapi.c ldblib.c lua.h
Log Message:
* added -Wcast-qual: this killed lots of unnecessary type-casts
Index: ldblib.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/lua/ldblib.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ldblib.c 16 Nov 2007 19:34:26 -0000 1.2
--- ldblib.c 16 Nov 2007 22:56:54 -0000 1.3
***************
*** 140,144 ****
static const char *const hooknames[] =
{"call", "return", "line", "count", "tail return"};
! lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_isfunction(L, -1)) {
--- 140,144 ----
static const char *const hooknames[] =
{"call", "return", "line", "count", "tail return"};
! lua_pushlightuserdata(L, &KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX);
if (lua_isfunction(L, -1)) {
***************
*** 186,190 ****
lua_sethook(L, hookf, makemask(smask, count), count);
}
! lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_pushvalue(L, 1);
lua_rawset(L, LUA_REGISTRYINDEX); /* set new hook */
--- 186,190 ----
lua_sethook(L, hookf, makemask(smask, count), count);
}
! lua_pushlightuserdata(L, &KEY_HOOK);
lua_pushvalue(L, 1);
lua_rawset(L, LUA_REGISTRYINDEX); /* set new hook */
***************
*** 200,204 ****
lua_pushliteral(L, "external hook");
else {
! lua_pushlightuserdata(L, (void *)&KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX); /* get hook */
}
--- 200,204 ----
lua_pushliteral(L, "external hook");
else {
! lua_pushlightuserdata(L, &KEY_HOOK);
lua_rawget(L, LUA_REGISTRYINDEX); /* get hook */
}
Index: lapi.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/lua/lapi.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lapi.c 20 Apr 2007 13:46:03 -0000 1.2
--- lapi.c 16 Nov 2007 22:56:54 -0000 1.3
***************
*** 468,474 ****
! LUA_API void lua_pushlightuserdata (lua_State *L, void *p) {
lua_lock(L);
! setpvalue(L->top, p);
api_incr_top(L);
lua_unlock(L);
--- 468,474 ----
! LUA_API void lua_pushlightuserdata (lua_State *L, const void *p) {
lua_lock(L);
! setpvalue(L->top, (void *)p);
api_incr_top(L);
lua_unlock(L);
Index: lua.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/tas/src/lua/lua.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** lua.h 20 Apr 2007 13:46:03 -0000 1.2
--- lua.h 16 Nov 2007 22:56:54 -0000 1.3
***************
*** 158,162 ****
LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);
LUA_API void lua_pushboolean (lua_State *L, int b);
! LUA_API void lua_pushlightuserdata (lua_State *L, void *p);
--- 158,162 ----
LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);
LUA_API void lua_pushboolean (lua_State *L, int b);
! LUA_API void lua_pushlightuserdata (lua_State *L, const void *p);
More information about the Olsr-cvs
mailing list