diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-07 13:39:23 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-07 13:39:23 -0200 |
| commit | 63633c5b5f0cd7ef85ad6988c361916b8ef5d3ac (patch) | |
| tree | 459aeb4eb83b241fda35d0b9606a5b548b57b93c | |
| parent | dff9be4224a1cd0f338b544b9e01d42f0f4e537f (diff) | |
| download | lua-63633c5b5f0cd7ef85ad6988c361916b8ef5d3ac.tar.gz lua-63633c5b5f0cd7ef85ad6988c361916b8ef5d3ac.tar.bz2 lua-63633c5b5f0cd7ef85ad6988c361916b8ef5d3ac.zip | |
better name for `lua_movethread'
| -rw-r--r-- | lapi.c | 4 | ||||
| -rw-r--r-- | lbaselib.c | 10 | ||||
| -rw-r--r-- | lua.h | 4 |
3 files changed, 9 insertions, 9 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.216 2002/11/06 19:08:00 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.217 2002/11/07 15:37:10 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 | */ |
| @@ -105,7 +105,7 @@ LUA_API int lua_checkstack (lua_State *L, int size) { | |||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | 107 | ||
| 108 | LUA_API void lua_movethread (lua_State *from, lua_State *to, int n) { | 108 | LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { |
| 109 | int i; | 109 | int i; |
| 110 | lua_lock(to); | 110 | lua_lock(to); |
| 111 | api_checknelems(from, n); | 111 | api_checknelems(from, n); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.103 2002/10/25 21:36:54 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.104 2002/11/06 19:08:00 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 | */ |
| @@ -561,17 +561,17 @@ static int auxresume (lua_State *L, lua_State *co, int narg) { | |||
| 561 | int status; | 561 | int status; |
| 562 | if (!lua_checkstack(co, narg)) | 562 | if (!lua_checkstack(co, narg)) |
| 563 | luaL_error(L, "too many arguments to resume"); | 563 | luaL_error(L, "too many arguments to resume"); |
| 564 | lua_movethread(L, co, narg); | 564 | lua_xmove(L, co, narg); |
| 565 | status = lua_resume(co, narg); | 565 | status = lua_resume(co, narg); |
| 566 | if (status == 0) { | 566 | if (status == 0) { |
| 567 | int nres = lua_gettop(co); | 567 | int nres = lua_gettop(co); |
| 568 | if (!lua_checkstack(L, narg)) | 568 | if (!lua_checkstack(L, narg)) |
| 569 | luaL_error(L, "too many results to resume"); | 569 | luaL_error(L, "too many results to resume"); |
| 570 | lua_movethread(co, L, nres); /* move yielded values */ | 570 | lua_xmove(co, L, nres); /* move yielded values */ |
| 571 | return nres; | 571 | return nres; |
| 572 | } | 572 | } |
| 573 | else { | 573 | else { |
| 574 | lua_movethread(co, L, 1); /* move error message */ | 574 | lua_xmove(co, L, 1); /* move error message */ |
| 575 | return -1; /* error flag */ | 575 | return -1; /* error flag */ |
| 576 | } | 576 | } |
| 577 | } | 577 | } |
| @@ -608,7 +608,7 @@ static int luaB_cocreate (lua_State *L) { | |||
| 608 | luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1, | 608 | luaL_arg_check(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1), 1, |
| 609 | "Lua function expected"); | 609 | "Lua function expected"); |
| 610 | lua_pushvalue(L, 1); /* move function to top */ | 610 | lua_pushvalue(L, 1); /* move function to top */ |
| 611 | lua_movethread(L, NL, 1); /* move function from L to NL */ | 611 | lua_xmove(L, NL, 1); /* move function from L to NL */ |
| 612 | return 1; | 612 | return 1; |
| 613 | } | 613 | } |
| 614 | 614 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.161 2002/10/25 21:31:28 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.162 2002/11/06 19:08:00 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 |
| @@ -123,7 +123,7 @@ LUA_API void lua_insert (lua_State *L, int idx); | |||
| 123 | LUA_API void lua_replace (lua_State *L, int idx); | 123 | LUA_API void lua_replace (lua_State *L, int idx); |
| 124 | LUA_API int lua_checkstack (lua_State *L, int sz); | 124 | LUA_API int lua_checkstack (lua_State *L, int sz); |
| 125 | 125 | ||
| 126 | LUA_API void lua_movethread (lua_State *from, lua_State *to, int n); | 126 | LUA_API void lua_xmove (lua_State *from, lua_State *to, int n); |
| 127 | 127 | ||
| 128 | 128 | ||
| 129 | /* | 129 | /* |
