diff options
| -rw-r--r-- | lapi.c | 9 | ||||
| -rw-r--r-- | lbaselib.c | 6 | ||||
| -rw-r--r-- | lua.h | 9 |
3 files changed, 9 insertions, 15 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 2.23 2004/12/13 12:15:11 roberto Exp $ | 2 | ** $Id: lapi.c,v 2.24 2005/01/04 15:55:12 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 | */ |
| @@ -826,7 +826,7 @@ LUA_API int lua_dump (lua_State *L, lua_Chunkwriter writer, void *data) { | |||
| 826 | } | 826 | } |
| 827 | 827 | ||
| 828 | 828 | ||
| 829 | LUA_API int lua_threadstatus (lua_State *L) { | 829 | LUA_API int lua_status (lua_State *L) { |
| 830 | return L->status; | 830 | return L->status; |
| 831 | } | 831 | } |
| 832 | 832 | ||
| @@ -890,11 +890,6 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { | |||
| 890 | */ | 890 | */ |
| 891 | 891 | ||
| 892 | 892 | ||
| 893 | LUA_API const char *lua_version (void) { | ||
| 894 | return LUA_VERSION; | ||
| 895 | } | ||
| 896 | |||
| 897 | |||
| 898 | LUA_API int lua_error (lua_State *L) { | 893 | LUA_API int lua_error (lua_State *L) { |
| 899 | lua_lock(L); | 894 | lua_lock(L); |
| 900 | api_checknelems(L, 1); | 895 | api_checknelems(L, 1); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.162 2004/12/07 18:31:34 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.163 2004/12/13 12:15:11 roberto Exp roberto $ |
| 3 | ** Basic library | 3 | ** Basic library |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -469,7 +469,7 @@ static int auxresume (lua_State *L, lua_State *co, int narg) { | |||
| 469 | int status; | 469 | int status; |
| 470 | if (!lua_checkstack(co, narg)) | 470 | if (!lua_checkstack(co, narg)) |
| 471 | luaL_error(L, "too many arguments to resume"); | 471 | luaL_error(L, "too many arguments to resume"); |
| 472 | if (lua_threadstatus(co) == 0 && lua_gettop(co) == 0) { | 472 | if (lua_status(co) == 0 && lua_gettop(co) == 0) { |
| 473 | lua_pushliteral(L, "cannot resume dead coroutine"); | 473 | lua_pushliteral(L, "cannot resume dead coroutine"); |
| 474 | return -1; /* error flag */ | 474 | return -1; /* error flag */ |
| 475 | } | 475 | } |
| @@ -549,7 +549,7 @@ static int luaB_costatus (lua_State *L) { | |||
| 549 | luaL_argcheck(L, co, 1, "coroutine expected"); | 549 | luaL_argcheck(L, co, 1, "coroutine expected"); |
| 550 | if (L == co) lua_pushliteral(L, "running"); | 550 | if (L == co) lua_pushliteral(L, "running"); |
| 551 | else { | 551 | else { |
| 552 | switch (lua_threadstatus(co)) { | 552 | switch (lua_status(co)) { |
| 553 | case LUA_YIELD: | 553 | case LUA_YIELD: |
| 554 | lua_pushliteral(L, "suspended"); | 554 | lua_pushliteral(L, "suspended"); |
| 555 | break; | 555 | break; |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.196 2004/12/06 17:53:42 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.197 2004/12/13 12:15:11 roberto Exp roberto $ |
| 3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
| 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil | 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil |
| 5 | ** http://www.lua.org mailto:info@lua.org | 5 | ** http://www.lua.org mailto:info@lua.org |
| @@ -18,6 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | 19 | ||
| 20 | #define LUA_VERSION "Lua 5.1 (work)" | 20 | #define LUA_VERSION "Lua 5.1 (work)" |
| 21 | #define LUA_VERSION_NUM 501 | ||
| 21 | #define LUA_COPYRIGHT "Copyright (C) 1994-2004 Tecgraf, PUC-Rio" | 22 | #define LUA_COPYRIGHT "Copyright (C) 1994-2004 Tecgraf, PUC-Rio" |
| 22 | #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" | 23 | #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" |
| 23 | 24 | ||
| @@ -37,7 +38,7 @@ | |||
| 37 | #define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) | 38 | #define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) |
| 38 | 39 | ||
| 39 | 40 | ||
| 40 | /* return codes for `lua_pcall', `lua_resume', and `lua_threadstatus' */ | 41 | /* return codes for `lua_pcall', `lua_resume', and `lua_status' */ |
| 41 | #define LUA_YIELD 1 | 42 | #define LUA_YIELD 1 |
| 42 | #define LUA_ERRRUN 2 | 43 | #define LUA_ERRRUN 2 |
| 43 | #define LUA_ERRSYNTAX 3 | 44 | #define LUA_ERRSYNTAX 3 |
| @@ -214,7 +215,7 @@ LUA_API int lua_dump (lua_State *L, lua_Chunkwriter writer, void *data); | |||
| 214 | */ | 215 | */ |
| 215 | LUA_API int lua_yield (lua_State *L, int nresults); | 216 | LUA_API int lua_yield (lua_State *L, int nresults); |
| 216 | LUA_API int lua_resume (lua_State *L, int narg); | 217 | LUA_API int lua_resume (lua_State *L, int narg); |
| 217 | LUA_API int lua_threadstatus (lua_State *L); | 218 | LUA_API int lua_status (lua_State *L); |
| 218 | 219 | ||
| 219 | /* | 220 | /* |
| 220 | ** garbage-collection function and options | 221 | ** garbage-collection function and options |
| @@ -235,8 +236,6 @@ LUA_API int lua_gc (lua_State *L, int what, int data); | |||
| 235 | ** miscellaneous functions | 236 | ** miscellaneous functions |
| 236 | */ | 237 | */ |
| 237 | 238 | ||
| 238 | LUA_API const char *lua_version (void); | ||
| 239 | |||
| 240 | LUA_API int lua_error (lua_State *L); | 239 | LUA_API int lua_error (lua_State *L); |
| 241 | 240 | ||
| 242 | LUA_API int lua_next (lua_State *L, int idx); | 241 | LUA_API int lua_next (lua_State *L, int idx); |
