diff options
| -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 */ |
