From 2be88d50843eafae123c28dfc9750fcf473f28e4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 1 Aug 2014 14:33:08 -0300 Subject: 'lua_Ctx' -> 'lua_Kcontext' --- lapi.c | 8 ++++---- lbaselib.c | 6 +++--- ldo.c | 4 ++-- lstate.h | 4 ++-- ltests.c | 6 +++--- lua.h | 14 +++++++------- luaconf.h | 15 ++++++++------- 7 files changed, 29 insertions(+), 28 deletions(-) diff --git a/lapi.c b/lapi.c index eb901cb3..9ba82982 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.231 2014/07/22 18:07:47 roberto Exp roberto $ +** $Id: lapi.c,v 2.232 2014/07/30 14:00:14 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -854,8 +854,8 @@ LUA_API void lua_setuservalue (lua_State *L, int idx) { "results from function overflow current stack size") -LUA_API void lua_callk (lua_State *L, int nargs, int nresults, lua_Ctx ctx, - lua_KFunction k) { +LUA_API void lua_callk (lua_State *L, int nargs, int nresults, + lua_Kcontext ctx, lua_KFunction k) { StkId func; lua_lock(L); api_check(k == NULL || !isLua(L->ci), @@ -894,7 +894,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_Ctx ctx, lua_KFunction k) { + lua_Kcontext ctx, lua_KFunction k) { struct CallS c; int status; ptrdiff_t func; diff --git a/lbaselib.c b/lbaselib.c index 223c09ec..595f240f 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.293 2014/07/24 19:33:29 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.294 2014/08/01 17:22:57 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -380,7 +380,7 @@ static int luaB_load (lua_State *L) { /* }====================================================== */ -static int dofilecont (lua_State *L, int d1, lua_Ctx d2) { +static int dofilecont (lua_State *L, int d1, lua_Kcontext d2) { (void)d1; (void)d2; /* only to match 'lua_Kfunction' prototype */ return lua_gettop(L) - 1; } @@ -431,7 +431,7 @@ static int luaB_select (lua_State *L) { ** 'extra' values (where 'extra' is exactly the number of items to be ** ignored). */ -static int finishpcall (lua_State *L, int status, lua_Ctx extra) { +static int finishpcall (lua_State *L, int status, lua_Kcontext extra) { if (status != LUA_OK && status != LUA_YIELD) { /* error? */ lua_pushboolean(L, 0); /* first result (false) */ lua_pushvalue(L, -2); /* error message */ diff --git a/ldo.c b/ldo.c index a9daeadb..0775246b 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 2.125 2014/07/15 21:26:50 roberto Exp roberto $ +** $Id: ldo.c,v 2.126 2014/07/17 13:53:37 roberto Exp roberto $ ** Stack and Call structure of Lua ** 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_Ctx ctx, +LUA_API int lua_yieldk (lua_State *L, int nresults, lua_Kcontext ctx, lua_KFunction k) { CallInfo *ci = L->ci; luai_userstateyield(L, nresults); diff --git a/lstate.h b/lstate.h index 6dae8990..32c53a9d 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.113 2014/07/18 14:46:47 roberto Exp roberto $ +** $Id: lstate.h,v 2.114 2014/07/23 17:15:43 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -68,7 +68,7 @@ typedef struct CallInfo { struct { /* only for C functions */ lua_KFunction k; /* continuation in case of yields */ ptrdiff_t old_errfunc; - lua_Ctx ctx; /* context info. in case of yields */ + lua_Kcontext ctx; /* context info. in case of yields */ } c; } u; ptrdiff_t extra; diff --git a/ltests.c b/ltests.c index 55167ca9..48fd8e23 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.181 2014/07/19 15:14:46 roberto Exp roberto $ +** $Id: ltests.c,v 2.182 2014/07/23 16:44:30 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -979,7 +979,7 @@ static void pushcode (lua_State *L, int code) { static int testC (lua_State *L); -static int Cfunck (lua_State *L, int status, lua_Ctx ctx); +static int Cfunck (lua_State *L, int status, lua_Kcontext ctx); /* ** arithmetic operation encoding for 'arith' instruction @@ -1316,7 +1316,7 @@ static int Cfunc (lua_State *L) { } -static int Cfunck (lua_State *L, int status, lua_Ctx ctx) { +static int Cfunck (lua_State *L, int status, lua_Kcontext ctx) { pushcode(L, status); lua_setglobal(L, "status"); lua_pushinteger(L, ctx); diff --git a/lua.h b/lua.h index 91e560af..8ac6991e 100644 --- a/lua.h +++ b/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.311 2014/07/24 14:00:16 roberto Exp roberto $ +** $Id: lua.h,v 1.312 2014/07/31 13:44:30 roberto Exp roberto $ ** Lua - A Scripting Language ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) ** See Copyright Notice at the end of this file @@ -94,7 +94,7 @@ typedef LUA_INTEGER lua_Integer; typedef LUA_UNSIGNED lua_Unsigned; /* type for continuation-function contexts */ -typedef LUA_CTXT lua_Ctx; +typedef LUA_KCONTEXT lua_Kcontext; /* @@ -105,7 +105,7 @@ typedef int (*lua_CFunction) (lua_State *L); /* ** Type for continuation functions */ -typedef int (*lua_KFunction) (lua_State *L, int status, lua_Ctx ctx); +typedef int (*lua_KFunction) (lua_State *L, int status, lua_Kcontext ctx); /* @@ -265,12 +265,12 @@ LUA_API void (lua_setuservalue) (lua_State *L, int idx); /* ** 'load' and 'call' functions (load and run Lua code) */ -LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults, lua_Ctx ctx, - lua_KFunction k); +LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults, + lua_Kcontext ctx, lua_KFunction k); #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_Ctx 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) LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, @@ -283,7 +283,7 @@ LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data, int strip); /* ** coroutine functions */ -LUA_API int (lua_yieldk) (lua_State *L, int nresults, lua_Ctx ctx, +LUA_API int (lua_yieldk) (lua_State *L, int nresults, lua_Kcontext ctx, lua_KFunction k); #define lua_yield(L,n) lua_yieldk(L, (n), 0, NULL) LUA_API int (lua_resume) (lua_State *L, lua_State *from, int narg); diff --git a/luaconf.h b/luaconf.h index 07e98a5d..3b51a1f3 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.211 2014/07/24 14:00:16 roberto Exp roberto $ +** $Id: luaconf.h,v 1.212 2014/07/24 19:33:29 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -263,19 +263,20 @@ /* -@@ LUA_CTXT is the type of the context ('ctx') for continuation functions. -@@ It must be a numerical type; Lua will use 'intptr_t' if available. +@@ LUA_KCONTEXT is the type of the context ('ctx') for continuation +@@ functions. It must be a numerical type; Lua will use 'intptr_t' if +@@ available. */ #if defined (LUA_USE_C99) #include #if defined (INTPTR_MAX) /* even in C99 this type is optional */ -#define LUA_CTXT intptr_t +#define LUA_KCONTEXT intptr_t #endif #endif -#if !defined(LUA_CTXT) +#if !defined(LUA_KCONTEXT) /* default definition (the nearest thing to 'intptr_t' in C89) */ -#define LUA_CTXT ptrdiff_t +#define LUA_KCONTEXT ptrdiff_t #endif @@ -305,7 +306,7 @@ #define LUA_COMPAT_BITLIB /* -@@ LUA_COMPAT_IPAIRS controls the effectivness of the __ipairs metamethod. +@@ LUA_COMPAT_IPAIRS controls the effectivnness of the __ipairs metamethod. */ #define LUA_COMPAT_IPAIRS -- cgit v1.2.3-55-g6feb