1
0
mirror of https://github.com/lua/lua.git synced 2025-01-28 06:03:00 +08:00

'lua_Kcontext' -> 'lua_KContext'

This commit is contained in:
Roberto Ierusalimschy 2014-10-07 15:29:13 -03:00
parent 3670db99b6
commit 2a21f6c894
6 changed files with 19 additions and 19 deletions

6
lapi.c
View File

@ -1,5 +1,5 @@
/* /*
** $Id: lapi.c,v 2.234 2014/08/21 20:07:56 roberto Exp roberto $ ** $Id: lapi.c,v 2.235 2014/08/27 14:59:33 roberto Exp roberto $
** Lua API ** Lua API
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -877,7 +877,7 @@ LUA_API void lua_setuservalue (lua_State *L, int idx) {
LUA_API void lua_callk (lua_State *L, int nargs, int nresults, LUA_API void lua_callk (lua_State *L, int nargs, int nresults,
lua_Kcontext ctx, lua_KFunction k) { lua_KContext ctx, lua_KFunction k) {
StkId func; StkId func;
lua_lock(L); lua_lock(L);
api_check(k == NULL || !isLua(L->ci), api_check(k == NULL || !isLua(L->ci),
@ -916,7 +916,7 @@ static void f_call (lua_State *L, void *ud) {
LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc,
lua_Kcontext ctx, lua_KFunction k) { lua_KContext ctx, lua_KFunction k) {
struct CallS c; struct CallS c;
int status; int status;
ptrdiff_t func; ptrdiff_t func;

View File

@ -1,5 +1,5 @@
/* /*
** $Id: lbaselib.c,v 1.298 2014/09/30 13:53:26 roberto Exp roberto $ ** $Id: lbaselib.c,v 1.299 2014/10/01 11:54:56 roberto Exp roberto $
** Basic library ** Basic library
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -370,7 +370,7 @@ static int luaB_load (lua_State *L) {
/* }====================================================== */ /* }====================================================== */
static int dofilecont (lua_State *L, int d1, lua_Kcontext d2) { static int dofilecont (lua_State *L, int d1, lua_KContext d2) {
(void)d1; (void)d2; /* only to match 'lua_Kfunction' prototype */ (void)d1; (void)d2; /* only to match 'lua_Kfunction' prototype */
return lua_gettop(L) - 1; return lua_gettop(L) - 1;
} }
@ -421,7 +421,7 @@ static int luaB_select (lua_State *L) {
** 'extra' values (where 'extra' is exactly the number of items to be ** 'extra' values (where 'extra' is exactly the number of items to be
** ignored). ** ignored).
*/ */
static int finishpcall (lua_State *L, int status, lua_Kcontext extra) { static int finishpcall (lua_State *L, int status, lua_KContext extra) {
if (status != LUA_OK && status != LUA_YIELD) { /* error? */ if (status != LUA_OK && status != LUA_YIELD) { /* error? */
lua_pushboolean(L, 0); /* first result (false) */ lua_pushboolean(L, 0); /* first result (false) */
lua_pushvalue(L, -2); /* error message */ lua_pushvalue(L, -2); /* error message */

4
ldo.c
View File

@ -1,5 +1,5 @@
/* /*
** $Id: ldo.c,v 2.126 2014/07/17 13:53:37 roberto Exp roberto $ ** $Id: ldo.c,v 2.127 2014/08/01 17:33:08 roberto Exp roberto $
** Stack and Call structure of Lua ** Stack and Call structure of Lua
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -593,7 +593,7 @@ LUA_API int lua_isyieldable (lua_State *L) {
} }
LUA_API int lua_yieldk (lua_State *L, int nresults, lua_Kcontext ctx, LUA_API int lua_yieldk (lua_State *L, int nresults, lua_KContext ctx,
lua_KFunction k) { lua_KFunction k) {
CallInfo *ci = L->ci; CallInfo *ci = L->ci;
luai_userstateyield(L, nresults); luai_userstateyield(L, nresults);

View File

@ -1,5 +1,5 @@
/* /*
** $Id: lstate.h,v 2.115 2014/08/01 17:33:08 roberto Exp roberto $ ** $Id: lstate.h,v 2.116 2014/10/06 21:34:34 roberto Exp roberto $
** Global State ** Global State
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -74,7 +74,7 @@ typedef struct CallInfo {
struct { /* only for C functions */ struct { /* only for C functions */
lua_KFunction k; /* continuation in case of yields */ lua_KFunction k; /* continuation in case of yields */
ptrdiff_t old_errfunc; ptrdiff_t old_errfunc;
lua_Kcontext ctx; /* context info. in case of yields */ lua_KContext ctx; /* context info. in case of yields */
} c; } c;
} u; } u;
ptrdiff_t extra; ptrdiff_t extra;

View File

@ -1,5 +1,5 @@
/* /*
** $Id: ltests.c,v 2.186 2014/10/01 11:54:56 roberto Exp roberto $ ** $Id: ltests.c,v 2.187 2014/10/06 17:06:49 roberto Exp roberto $
** Internal Module for Debugging of the Lua Implementation ** Internal Module for Debugging of the Lua Implementation
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -986,7 +986,7 @@ static void pushcode (lua_State *L, int code) {
static int testC (lua_State *L); static int testC (lua_State *L);
static int Cfunck (lua_State *L, int status, lua_Kcontext ctx); static int Cfunck (lua_State *L, int status, lua_KContext ctx);
/* /*
** arithmetic operation encoding for 'arith' instruction ** arithmetic operation encoding for 'arith' instruction
@ -1323,7 +1323,7 @@ static int Cfunc (lua_State *L) {
} }
static int Cfunck (lua_State *L, int status, lua_Kcontext ctx) { static int Cfunck (lua_State *L, int status, lua_KContext ctx) {
pushcode(L, status); pushcode(L, status);
lua_setglobal(L, "status"); lua_setglobal(L, "status");
lua_pushinteger(L, ctx); lua_pushinteger(L, ctx);

12
lua.h
View File

@ -1,5 +1,5 @@
/* /*
** $Id: lua.h,v 1.315 2014/10/01 11:54:56 roberto Exp roberto $ ** $Id: lua.h,v 1.316 2014/10/04 22:57:36 roberto Exp roberto $
** Lua - A Scripting Language ** Lua - A Scripting Language
** Lua.org, PUC-Rio, Brazil (http://www.lua.org) ** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
** See Copyright Notice at the end of this file ** See Copyright Notice at the end of this file
@ -94,7 +94,7 @@ typedef LUA_INTEGER lua_Integer;
typedef LUA_UNSIGNED lua_Unsigned; typedef LUA_UNSIGNED lua_Unsigned;
/* type for continuation-function contexts */ /* type for continuation-function contexts */
typedef LUA_KCONTEXT lua_Kcontext; typedef LUA_KCONTEXT lua_KContext;
/* /*
@ -105,7 +105,7 @@ typedef int (*lua_CFunction) (lua_State *L);
/* /*
** Type for continuation functions ** Type for continuation functions
*/ */
typedef int (*lua_KFunction) (lua_State *L, int status, lua_Kcontext ctx); typedef int (*lua_KFunction) (lua_State *L, int status, lua_KContext ctx);
/* /*
@ -268,11 +268,11 @@ LUA_API void (lua_setuservalue) (lua_State *L, int idx);
** 'load' and 'call' functions (load and run Lua code) ** 'load' and 'call' functions (load and run Lua code)
*/ */
LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults, LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults,
lua_Kcontext ctx, lua_KFunction k); lua_KContext ctx, lua_KFunction k);
#define lua_call(L,n,r) lua_callk(L, (n), (r), 0, NULL) #define lua_call(L,n,r) lua_callk(L, (n), (r), 0, NULL)
LUA_API int (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc, LUA_API int (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc,
lua_Kcontext ctx, lua_KFunction k); lua_KContext ctx, lua_KFunction k);
#define lua_pcall(L,n,r,f) lua_pcallk(L, (n), (r), (f), 0, NULL) #define lua_pcall(L,n,r,f) lua_pcallk(L, (n), (r), (f), 0, NULL)
LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt,
@ -285,7 +285,7 @@ LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data, int strip);
/* /*
** coroutine functions ** coroutine functions
*/ */
LUA_API int (lua_yieldk) (lua_State *L, int nresults, lua_Kcontext ctx, LUA_API int (lua_yieldk) (lua_State *L, int nresults, lua_KContext ctx,
lua_KFunction k); lua_KFunction k);
#define lua_yield(L,n) lua_yieldk(L, (n), 0, NULL) #define lua_yield(L,n) lua_yieldk(L, (n), 0, NULL)
LUA_API int (lua_resume) (lua_State *L, lua_State *from, int narg); LUA_API int (lua_resume) (lua_State *L, lua_State *from, int narg);