diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-08-01 14:33:08 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-08-01 14:33:08 -0300 |
commit | 2be88d50843eafae123c28dfc9750fcf473f28e4 (patch) | |
tree | 489cdf215995776425d78665a34dedb09a54c028 | |
parent | f5c690b684b8503dce9fe9f9e1a956cabd1c8699 (diff) | |
download | lua-2be88d50843eafae123c28dfc9750fcf473f28e4.tar.gz lua-2be88d50843eafae123c28dfc9750fcf473f28e4.tar.bz2 lua-2be88d50843eafae123c28dfc9750fcf473f28e4.zip |
'lua_Ctx' -> 'lua_Kcontext'
-rw-r--r-- | lapi.c | 8 | ||||
-rw-r--r-- | lbaselib.c | 6 | ||||
-rw-r--r-- | ldo.c | 4 | ||||
-rw-r--r-- | lstate.h | 4 | ||||
-rw-r--r-- | ltests.c | 6 | ||||
-rw-r--r-- | lua.h | 14 | ||||
-rw-r--r-- | luaconf.h | 15 |
7 files changed, 29 insertions, 28 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.231 2014/07/22 18:07:47 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.232 2014/07/30 14:00:14 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 | */ |
@@ -854,8 +854,8 @@ LUA_API void lua_setuservalue (lua_State *L, int idx) { | |||
854 | "results from function overflow current stack size") | 854 | "results from function overflow current stack size") |
855 | 855 | ||
856 | 856 | ||
857 | LUA_API void lua_callk (lua_State *L, int nargs, int nresults, lua_Ctx ctx, | 857 | LUA_API void lua_callk (lua_State *L, int nargs, int nresults, |
858 | lua_KFunction k) { | 858 | lua_Kcontext ctx, lua_KFunction k) { |
859 | StkId func; | 859 | StkId func; |
860 | lua_lock(L); | 860 | lua_lock(L); |
861 | api_check(k == NULL || !isLua(L->ci), | 861 | api_check(k == NULL || !isLua(L->ci), |
@@ -894,7 +894,7 @@ static void f_call (lua_State *L, void *ud) { | |||
894 | 894 | ||
895 | 895 | ||
896 | LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, | 896 | LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc, |
897 | lua_Ctx ctx, lua_KFunction k) { | 897 | lua_Kcontext ctx, lua_KFunction k) { |
898 | struct CallS c; | 898 | struct CallS c; |
899 | int status; | 899 | int status; |
900 | ptrdiff_t func; | 900 | ptrdiff_t func; |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.293 2014/07/24 19:33:29 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.294 2014/08/01 17:22:57 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 | */ |
@@ -380,7 +380,7 @@ static int luaB_load (lua_State *L) { | |||
380 | /* }====================================================== */ | 380 | /* }====================================================== */ |
381 | 381 | ||
382 | 382 | ||
383 | static int dofilecont (lua_State *L, int d1, lua_Ctx d2) { | 383 | static int dofilecont (lua_State *L, int d1, lua_Kcontext d2) { |
384 | (void)d1; (void)d2; /* only to match 'lua_Kfunction' prototype */ | 384 | (void)d1; (void)d2; /* only to match 'lua_Kfunction' prototype */ |
385 | return lua_gettop(L) - 1; | 385 | return lua_gettop(L) - 1; |
386 | } | 386 | } |
@@ -431,7 +431,7 @@ static int luaB_select (lua_State *L) { | |||
431 | ** 'extra' values (where 'extra' is exactly the number of items to be | 431 | ** 'extra' values (where 'extra' is exactly the number of items to be |
432 | ** ignored). | 432 | ** ignored). |
433 | */ | 433 | */ |
434 | static int finishpcall (lua_State *L, int status, lua_Ctx extra) { | 434 | static int finishpcall (lua_State *L, int status, lua_Kcontext extra) { |
435 | if (status != LUA_OK && status != LUA_YIELD) { /* error? */ | 435 | if (status != LUA_OK && status != LUA_YIELD) { /* error? */ |
436 | lua_pushboolean(L, 0); /* first result (false) */ | 436 | lua_pushboolean(L, 0); /* first result (false) */ |
437 | lua_pushvalue(L, -2); /* error message */ | 437 | lua_pushvalue(L, -2); /* error message */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.125 2014/07/15 21:26:50 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.126 2014/07/17 13:53:37 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -593,7 +593,7 @@ LUA_API int lua_isyieldable (lua_State *L) { | |||
593 | } | 593 | } |
594 | 594 | ||
595 | 595 | ||
596 | LUA_API int lua_yieldk (lua_State *L, int nresults, lua_Ctx ctx, | 596 | LUA_API int lua_yieldk (lua_State *L, int nresults, lua_Kcontext ctx, |
597 | lua_KFunction k) { | 597 | lua_KFunction k) { |
598 | CallInfo *ci = L->ci; | 598 | CallInfo *ci = L->ci; |
599 | luai_userstateyield(L, nresults); | 599 | luai_userstateyield(L, nresults); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.113 2014/07/18 14:46:47 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.114 2014/07/23 17:15:43 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -68,7 +68,7 @@ typedef struct CallInfo { | |||
68 | struct { /* only for C functions */ | 68 | struct { /* only for C functions */ |
69 | lua_KFunction k; /* continuation in case of yields */ | 69 | lua_KFunction k; /* continuation in case of yields */ |
70 | ptrdiff_t old_errfunc; | 70 | ptrdiff_t old_errfunc; |
71 | lua_Ctx ctx; /* context info. in case of yields */ | 71 | lua_Kcontext ctx; /* context info. in case of yields */ |
72 | } c; | 72 | } c; |
73 | } u; | 73 | } u; |
74 | ptrdiff_t extra; | 74 | ptrdiff_t extra; |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.181 2014/07/19 15:14:46 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.182 2014/07/23 16:44:30 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -979,7 +979,7 @@ static void pushcode (lua_State *L, int code) { | |||
979 | 979 | ||
980 | 980 | ||
981 | static int testC (lua_State *L); | 981 | static int testC (lua_State *L); |
982 | static int Cfunck (lua_State *L, int status, lua_Ctx ctx); | 982 | static int Cfunck (lua_State *L, int status, lua_Kcontext ctx); |
983 | 983 | ||
984 | /* | 984 | /* |
985 | ** arithmetic operation encoding for 'arith' instruction | 985 | ** arithmetic operation encoding for 'arith' instruction |
@@ -1316,7 +1316,7 @@ static int Cfunc (lua_State *L) { | |||
1316 | } | 1316 | } |
1317 | 1317 | ||
1318 | 1318 | ||
1319 | static int Cfunck (lua_State *L, int status, lua_Ctx ctx) { | 1319 | static int Cfunck (lua_State *L, int status, lua_Kcontext ctx) { |
1320 | pushcode(L, status); | 1320 | pushcode(L, status); |
1321 | lua_setglobal(L, "status"); | 1321 | lua_setglobal(L, "status"); |
1322 | lua_pushinteger(L, ctx); | 1322 | lua_pushinteger(L, ctx); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.311 2014/07/24 14:00:16 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.312 2014/07/31 13:44:30 roberto Exp roberto $ |
3 | ** Lua - A Scripting Language | 3 | ** Lua - A Scripting Language |
4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) | 4 | ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) |
5 | ** See Copyright Notice at the end of this file | 5 | ** See Copyright Notice at the end of this file |
@@ -94,7 +94,7 @@ typedef LUA_INTEGER lua_Integer; | |||
94 | typedef LUA_UNSIGNED lua_Unsigned; | 94 | typedef LUA_UNSIGNED lua_Unsigned; |
95 | 95 | ||
96 | /* type for continuation-function contexts */ | 96 | /* type for continuation-function contexts */ |
97 | typedef LUA_CTXT lua_Ctx; | 97 | typedef LUA_KCONTEXT lua_Kcontext; |
98 | 98 | ||
99 | 99 | ||
100 | /* | 100 | /* |
@@ -105,7 +105,7 @@ typedef int (*lua_CFunction) (lua_State *L); | |||
105 | /* | 105 | /* |
106 | ** Type for continuation functions | 106 | ** Type for continuation functions |
107 | */ | 107 | */ |
108 | typedef int (*lua_KFunction) (lua_State *L, int status, lua_Ctx ctx); | 108 | typedef int (*lua_KFunction) (lua_State *L, int status, lua_Kcontext ctx); |
109 | 109 | ||
110 | 110 | ||
111 | /* | 111 | /* |
@@ -265,12 +265,12 @@ LUA_API void (lua_setuservalue) (lua_State *L, int idx); | |||
265 | /* | 265 | /* |
266 | ** 'load' and 'call' functions (load and run Lua code) | 266 | ** 'load' and 'call' functions (load and run Lua code) |
267 | */ | 267 | */ |
268 | LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults, lua_Ctx ctx, | 268 | LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults, |
269 | lua_KFunction k); | 269 | lua_Kcontext ctx, lua_KFunction k); |
270 | #define lua_call(L,n,r) lua_callk(L, (n), (r), 0, NULL) | 270 | #define lua_call(L,n,r) lua_callk(L, (n), (r), 0, NULL) |
271 | 271 | ||
272 | LUA_API int (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc, | 272 | LUA_API int (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc, |
273 | lua_Ctx ctx, lua_KFunction k); | 273 | lua_Kcontext ctx, lua_KFunction k); |
274 | #define lua_pcall(L,n,r,f) lua_pcallk(L, (n), (r), (f), 0, NULL) | 274 | #define lua_pcall(L,n,r,f) lua_pcallk(L, (n), (r), (f), 0, NULL) |
275 | 275 | ||
276 | LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt, | 276 | 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); | |||
283 | /* | 283 | /* |
284 | ** coroutine functions | 284 | ** coroutine functions |
285 | */ | 285 | */ |
286 | LUA_API int (lua_yieldk) (lua_State *L, int nresults, lua_Ctx ctx, | 286 | LUA_API int (lua_yieldk) (lua_State *L, int nresults, lua_Kcontext ctx, |
287 | lua_KFunction k); | 287 | lua_KFunction k); |
288 | #define lua_yield(L,n) lua_yieldk(L, (n), 0, NULL) | 288 | #define lua_yield(L,n) lua_yieldk(L, (n), 0, NULL) |
289 | LUA_API int (lua_resume) (lua_State *L, lua_State *from, int narg); | 289 | LUA_API int (lua_resume) (lua_State *L, lua_State *from, int narg); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: luaconf.h,v 1.211 2014/07/24 14:00:16 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.212 2014/07/24 19:33:29 roberto Exp roberto $ |
3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -263,19 +263,20 @@ | |||
263 | 263 | ||
264 | 264 | ||
265 | /* | 265 | /* |
266 | @@ LUA_CTXT is the type of the context ('ctx') for continuation functions. | 266 | @@ LUA_KCONTEXT is the type of the context ('ctx') for continuation |
267 | @@ It must be a numerical type; Lua will use 'intptr_t' if available. | 267 | @@ functions. It must be a numerical type; Lua will use 'intptr_t' if |
268 | @@ available. | ||
268 | */ | 269 | */ |
269 | #if defined (LUA_USE_C99) | 270 | #if defined (LUA_USE_C99) |
270 | #include <stdint.h> | 271 | #include <stdint.h> |
271 | #if defined (INTPTR_MAX) /* even in C99 this type is optional */ | 272 | #if defined (INTPTR_MAX) /* even in C99 this type is optional */ |
272 | #define LUA_CTXT intptr_t | 273 | #define LUA_KCONTEXT intptr_t |
273 | #endif | 274 | #endif |
274 | #endif | 275 | #endif |
275 | 276 | ||
276 | #if !defined(LUA_CTXT) | 277 | #if !defined(LUA_KCONTEXT) |
277 | /* default definition (the nearest thing to 'intptr_t' in C89) */ | 278 | /* default definition (the nearest thing to 'intptr_t' in C89) */ |
278 | #define LUA_CTXT ptrdiff_t | 279 | #define LUA_KCONTEXT ptrdiff_t |
279 | #endif | 280 | #endif |
280 | 281 | ||
281 | 282 | ||
@@ -305,7 +306,7 @@ | |||
305 | #define LUA_COMPAT_BITLIB | 306 | #define LUA_COMPAT_BITLIB |
306 | 307 | ||
307 | /* | 308 | /* |
308 | @@ LUA_COMPAT_IPAIRS controls the effectivness of the __ipairs metamethod. | 309 | @@ LUA_COMPAT_IPAIRS controls the effectivnness of the __ipairs metamethod. |
309 | */ | 310 | */ |
310 | #define LUA_COMPAT_IPAIRS | 311 | #define LUA_COMPAT_IPAIRS |
311 | 312 | ||