Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 10, 2009, 4:01:42 PM (15 years ago)
Author:
rgrieder
Message:

Tolua update to v1.0.93 is not working properly and I would not know how to fix it. I have created a patch however, just in case we need it after all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/tolua/tolua_is.c

    r3127 r3138  
    8686}
    8787
    88 TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err)
     88TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err)
    8989{
    9090        if (msg[0] == '#')
     
    117117
    118118/* the equivalent of lua_is* for usertable */
    119 static  int lua_isusertable (lua_State* L, int lo, const const char* type)
     119static  int lua_isusertable (lua_State* L, int lo, const char* type)
    120120{
    121121        int r = 0;
     
    213213 return 0;
    214214}
     215TOLUA_API int tolua_isvalue (lua_State* L, int lo, int def, tolua_Error* err)
     216{
     217        if (def || abs(lo)<=lua_gettop(L))  /* any valid index */
     218                return 1;
     219        err->index = lo;
     220        err->array = 0;
     221        err->type = "value";
     222        return 0;
     223}
    215224
    216225TOLUA_API int tolua_isboolean (lua_State* L, int lo, int def, tolua_Error* err)
     
    284293        err->array = 0;
    285294        err->type = "userdata";
    286         return 0;
    287 }
    288 
    289 TOLUA_API int tolua_isvaluenil (lua_State* L, int lo, tolua_Error* err) {
    290 
    291         if (lua_gettop(L)<abs(lo))
    292                 return 0; /* somebody else should chack this */
    293         if (!lua_isnil(L, lo))
    294                 return 0;
    295        
    296         err->index = lo;
    297         err->array = 0;
    298         err->type = "value";
    299         return 1;
    300 };
    301 
    302 TOLUA_API int tolua_isvalue (lua_State* L, int lo, int def, tolua_Error* err)
    303 {
    304         if (def || abs(lo)<=lua_gettop(L))  /* any valid index */
    305                 return 1;
    306         err->index = lo;
    307         err->array = 0;
    308         err->type = "value";
    309295        return 0;
    310296}
Note: See TracChangeset for help on using the changeset viewer.