Removed uses of LUA_NUMTAGS
That constant was already deprecated (see commit 6aabf4b15e).
This commit is contained in:
2
lgc.c
2
lgc.c
@@ -330,7 +330,7 @@ static void reallymarkobject (global_State *g, GCObject *o) {
|
|||||||
*/
|
*/
|
||||||
static void markmt (global_State *g) {
|
static void markmt (global_State *g) {
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i < LUA_NUMTAGS; i++)
|
for (i=0; i < LUA_NUMTYPES; i++)
|
||||||
markobjectN(g, g->mt[i]);
|
markobjectN(g, g->mt[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
lstate.c
2
lstate.c
@@ -371,7 +371,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud, unsigned int seed) {
|
|||||||
setgcparam(g, MINORMUL, LUAI_GENMINORMUL);
|
setgcparam(g, MINORMUL, LUAI_GENMINORMUL);
|
||||||
setgcparam(g, MINORMAJOR, LUAI_MINORMAJOR);
|
setgcparam(g, MINORMAJOR, LUAI_MINORMAJOR);
|
||||||
setgcparam(g, MAJORMINOR, LUAI_MAJORMINOR);
|
setgcparam(g, MAJORMINOR, LUAI_MAJORMINOR);
|
||||||
for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL;
|
for (i=0; i < LUA_NUMTYPES; i++) g->mt[i] = NULL;
|
||||||
if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) {
|
if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) {
|
||||||
/* memory allocation error: free partial state */
|
/* memory allocation error: free partial state */
|
||||||
close_state(L);
|
close_state(L);
|
||||||
|
|||||||
4
ltests.c
4
ltests.c
@@ -216,7 +216,7 @@ void *debug_realloc (void *ud, void *b, size_t oldsize, size_t size) {
|
|||||||
mc->memlimit = limit ? strtoul(limit, NULL, 10) : ULONG_MAX;
|
mc->memlimit = limit ? strtoul(limit, NULL, 10) : ULONG_MAX;
|
||||||
}
|
}
|
||||||
if (block == NULL) {
|
if (block == NULL) {
|
||||||
type = (oldsize < LUA_NUMTAGS) ? oldsize : 0;
|
type = (oldsize < LUA_NUMTYPES) ? oldsize : 0;
|
||||||
oldsize = 0;
|
oldsize = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -856,7 +856,7 @@ static int mem_query (lua_State *L) {
|
|||||||
else {
|
else {
|
||||||
const char *t = luaL_checkstring(L, 1);
|
const char *t = luaL_checkstring(L, 1);
|
||||||
int i;
|
int i;
|
||||||
for (i = LUA_NUMTAGS - 1; i >= 0; i--) {
|
for (i = LUA_NUMTYPES - 1; i >= 0; i--) {
|
||||||
if (strcmp(t, ttypename(i)) == 0) {
|
if (strcmp(t, ttypename(i)) == 0) {
|
||||||
lua_pushinteger(L, l_memcontrol.objcount[i]);
|
lua_pushinteger(L, l_memcontrol.objcount[i]);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
2
lua.h
2
lua.h
@@ -442,8 +442,6 @@ LUA_API void (lua_closeslot) (lua_State *L, int idx);
|
|||||||
#define lua_getuservalue(L,idx) lua_getiuservalue(L,idx,1)
|
#define lua_getuservalue(L,idx) lua_getiuservalue(L,idx,1)
|
||||||
#define lua_setuservalue(L,idx) lua_setiuservalue(L,idx,1)
|
#define lua_setuservalue(L,idx) lua_setiuservalue(L,idx,1)
|
||||||
|
|
||||||
#define LUA_NUMTAGS LUA_NUMTYPES
|
|
||||||
|
|
||||||
#define lua_resetthread(L) lua_closethread(L,NULL)
|
#define lua_resetthread(L) lua_closethread(L,NULL)
|
||||||
|
|
||||||
/* }============================================================== */
|
/* }============================================================== */
|
||||||
|
|||||||
Reference in New Issue
Block a user