diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-05-02 16:41:43 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-05-02 16:41:43 -0300 |
| commit | 6443185167c77adcc8552a3fee7edab7895db1a9 (patch) | |
| tree | 20add1421687313b7dcb4b9481771ed60d21d3c5 /lstate.c | |
| parent | e15f1f2bb7a38a3c94519294d031e48508d65006 (diff) | |
| download | lua-6443185167c77adcc8552a3fee7edab7895db1a9.tar.gz lua-6443185167c77adcc8552a3fee7edab7895db1a9.tar.bz2 lua-6443185167c77adcc8552a3fee7edab7895db1a9.zip | |
"Emergency" new version 5.4.6v5.4.6
'lua_resetthread' is back to its original signature, to avoid
incompatibilities in the ABI between releases of the same version.
New function 'lua_closethread' added with the "correct" signature.
Diffstat (limited to 'lstate.c')
| -rw-r--r-- | lstate.c | 10 |
1 files changed, 9 insertions, 1 deletions
| @@ -339,7 +339,7 @@ int luaE_resetthread (lua_State *L, int status) { | |||
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | 341 | ||
| 342 | LUA_API int lua_resetthread (lua_State *L, lua_State *from) { | 342 | LUA_API int lua_closethread (lua_State *L, lua_State *from) { |
| 343 | int status; | 343 | int status; |
| 344 | lua_lock(L); | 344 | lua_lock(L); |
| 345 | L->nCcalls = (from) ? getCcalls(from) : 0; | 345 | L->nCcalls = (from) ? getCcalls(from) : 0; |
| @@ -349,6 +349,14 @@ LUA_API int lua_resetthread (lua_State *L, lua_State *from) { | |||
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | 351 | ||
| 352 | /* | ||
| 353 | ** Deprecated! Use 'lua_closethread' instead. | ||
| 354 | */ | ||
| 355 | LUA_API int lua_resetthread (lua_State *L) { | ||
| 356 | return lua_closethread(L, NULL); | ||
| 357 | } | ||
| 358 | |||
| 359 | |||
| 352 | LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { | 360 | LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { |
| 353 | int i; | 361 | int i; |
| 354 | lua_State *L; | 362 | lua_State *L; |
