/[enigma]/enigma/lib-src/lua/tolua_lb.c
ViewVC logotype

Diff of /enigma/lib-src/lua/tolua_lb.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dheck, Sun Feb 9 21:30:32 2003 UTC revision 1.2 by reallysoft, Mon May 19 12:12:43 2003 UTC
# Line 6  Line 6 
6  ** $Id$  ** $Id$
7  */  */
8    
9  /* This code is free software; you can redistribute it and/or modify it.  /* This code is free software; you can redistribute it and/or modify it.
10  ** The software provided hereunder is on an "as is" basis, and  ** The software provided hereunder is on an "as is" basis, and
11  ** the author has no obligation to provide maintenance, support, updates,  ** the author has no obligation to provide maintenance, support, updates,
12  ** enhancements, or modifications.  ** enhancements, or modifications.
13  */  */
14    
15  #include "tolua.h"  #include "tolua.h"
# Line 50  void tolua_class (lua_State* L, int deri Line 50  void tolua_class (lua_State* L, int deri
50   lua_pushvalue(L,derived);   lua_pushvalue(L,derived);
51   lua_pushstring(L,".base");   lua_pushstring(L,".base");
52   lua_pushvalue(L,base);   lua_pushvalue(L,base);
53   lua_rawset(L,-3);   lua_rawset(L,-3);
54   lua_pushstring(L,".itag");   lua_pushstring(L,".itag");
55   lua_pushnumber(L,tag);   lua_pushnumber(L,tag);
56   lua_rawset(L,-3);   lua_rawset(L,-3);
# Line 112  const char* tolua_type (lua_State* L, in Line 112  const char* tolua_type (lua_State* L, in
112   return toluaI_tt_getobjtype(L,lo);   return toluaI_tt_getobjtype(L,lo);
113  }  }
114    
115  int tolua_tag (lua_State* L, char* type)  int tolua_tag (lua_State* L, const char* type)
116  {  {
117   return toluaI_tt_gettag(L,type);   return toluaI_tt_gettag(L,type);
118  }  }
# Line 126  int tolua_base (lua_State* L, int lo) Line 126  int tolua_base (lua_State* L, int lo)
126   }   }
127   else if (lua_istable(L,lo))   else if (lua_istable(L,lo))
128   {   {
129    lua_pushvalue(L,lo);    lua_pushvalue(L,lo);
130    lua_pushstring(L,".base");    lua_pushstring(L,".base");
131    lua_rawget(L,-2);    lua_rawget(L,-2);
132    return -1;    return -1;
# Line 152  void tolua_takeownership (lua_State* L, Line 152  void tolua_takeownership (lua_State* L,
152   {   {
153    /* force garbage collection to avoid C to reuse a to-be-collected address */    /* force garbage collection to avoid C to reuse a to-be-collected address */
154    lua_setgcthreshold(L,0);    lua_setgcthreshold(L,0);
155    tolua_doclone(L,lua_touserdata(L,lo),lua_tag(L,lo));      tolua_doclone(L,lua_touserdata(L,lo),lua_tag(L,lo));
156   }   }
157   else   else
158    tolua_error(L,"cannot take ownership of specified obejct.");    tolua_error(L,"cannot take ownership of specified obejct.");

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26