diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-04-19 13:34:46 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-04-19 13:34:46 -0300 |
| commit | 99a39f6f4a6f944a0cce2505392bf24074db3d98 (patch) | |
| tree | 16df7af2310c3df80955f45c2f126352e1eb878c | |
| parent | 1bb407e494072b2fb05efcf53af3eb100abe981d (diff) | |
| download | lua-99a39f6f4a6f944a0cce2505392bf24074db3d98.tar.gz lua-99a39f6f4a6f944a0cce2505392bf24074db3d98.tar.bz2 lua-99a39f6f4a6f944a0cce2505392bf24074db3d98.zip | |
tells the allocation function that the first block is a thread
| -rw-r--r-- | lstate.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.c,v 2.79 2010/04/12 16:07:06 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.80 2010/04/14 15:14:21 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -218,7 +218,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { | |||
| 218 | int i; | 218 | int i; |
| 219 | lua_State *L; | 219 | lua_State *L; |
| 220 | global_State *g; | 220 | global_State *g; |
| 221 | LG *l = cast(LG *, (*f)(ud, NULL, 0, sizeof(LG))); | 221 | LG *l = cast(LG *, (*f)(ud, NULL, LUA_TTHREAD, sizeof(LG))); |
| 222 | if (l == NULL) return NULL; | 222 | if (l == NULL) return NULL; |
| 223 | L = &l->l.l; | 223 | L = &l->l.l; |
| 224 | g = &l->g; | 224 | g = &l->g; |
