diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-07 15:10:01 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-07 15:10:01 -0300 |
| commit | 8e1bdda66a7eba39a39d27dffe6412e7d37ad09c (patch) | |
| tree | a6ffda9461ee1f175e0edc9ab484724ab2cbb333 | |
| parent | 9c1347e647a44d5c60d5b1d568204fcffb856911 (diff) | |
| download | lua-8e1bdda66a7eba39a39d27dffe6412e7d37ad09c.tar.gz lua-8e1bdda66a7eba39a39d27dffe6412e7d37ad09c.tar.bz2 lua-8e1bdda66a7eba39a39d27dffe6412e7d37ad09c.zip | |
stupid bug when calling 'luaC_changemode' (in function lua_gc)
| -rw-r--r-- | lapi.c | 9 |
1 files changed, 6 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 2.125 2010/04/29 17:31:31 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.126 2010/05/05 18:53:41 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -966,9 +966,12 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { | |||
| 966 | res = !gcstopped(g); | 966 | res = !gcstopped(g); |
| 967 | break; | 967 | break; |
| 968 | } | 968 | } |
| 969 | case LUA_GCGEN: /* change collector to generational mode */ | 969 | case LUA_GCGEN: { /* change collector to generational mode */ |
| 970 | luaC_changemode(L, KGC_GEN); | ||
| 971 | break; | ||
| 972 | } | ||
| 970 | case LUA_GCINC: { /* change collector to incremental mode */ | 973 | case LUA_GCINC: { /* change collector to incremental mode */ |
| 971 | luaC_changemode(L, what); | 974 | luaC_changemode(L, KGC_NORMAL); |
| 972 | break; | 975 | break; |
| 973 | } | 976 | } |
| 974 | default: res = -1; /* invalid option */ | 977 | default: res = -1; /* invalid option */ |
