'fTransfer' -> 'ftransfer' / 'nTransfer' -> 'ntransfer'

(keep the standard of names in lower case)
This commit is contained in:
Roberto Ierusalimschy 2018-03-16 12:33:34 -03:00
parent c3cb31fa9a
commit 4907444db9
5 changed files with 21 additions and 21 deletions

View File

@ -1,5 +1,5 @@
/* /*
** $Id: ldblib.c,v 1.153 2018/02/20 16:52:50 roberto Exp roberto $ ** $Id: ldblib.c,v 1.154 2018/03/05 14:15:04 roberto Exp roberto $
** Interface from Lua to its debug API ** Interface from Lua to its debug API
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -186,8 +186,8 @@ static int db_getinfo (lua_State *L) {
settabss(L, "namewhat", ar.namewhat); settabss(L, "namewhat", ar.namewhat);
} }
if (strchr(options, 'r')) { if (strchr(options, 'r')) {
settabsi(L, "fTransfer", ar.fTransfer); settabsi(L, "ftransfer", ar.ftransfer);
settabsi(L, "nTransfer", ar.nTransfer); settabsi(L, "ntransfer", ar.ntransfer);
} }
if (strchr(options, 't')) if (strchr(options, 't'))
settabsb(L, "istailcall", ar.istailcall); settabsb(L, "istailcall", ar.istailcall);

View File

@ -1,5 +1,5 @@
/* /*
** $Id: ldebug.c,v 2.154 2018/02/09 15:16:06 roberto Exp roberto $ ** $Id: ldebug.c,v 2.155 2018/02/17 19:29:29 roberto Exp roberto $
** Debug Interface ** Debug Interface
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -358,10 +358,10 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,
} }
case 'r': { case 'r': {
if (ci == NULL || !(ci->callstatus & CIST_TRAN)) if (ci == NULL || !(ci->callstatus & CIST_TRAN))
ar->fTransfer = ar->nTransfer = 0; ar->ftransfer = ar->ntransfer = 0;
else { else {
ar->fTransfer = ci->u2.transferinfo.fTransfer; ar->ftransfer = ci->u2.transferinfo.ftransfer;
ar->nTransfer = ci->u2.transferinfo.nTransfer; ar->ntransfer = ci->u2.transferinfo.ntransfer;
} }
} }
case 'L': case 'L':

16
ldo.c
View File

@ -1,5 +1,5 @@
/* /*
** $Id: ldo.c,v 2.198 2018/03/05 14:13:55 roberto Exp roberto $ ** $Id: ldo.c,v 2.199 2018/03/07 16:26:01 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
*/ */
@ -268,7 +268,7 @@ void luaD_inctop (lua_State *L) {
** function, can be changed asynchronously by signals.) ** function, can be changed asynchronously by signals.)
*/ */
void luaD_hook (lua_State *L, int event, int line, void luaD_hook (lua_State *L, int event, int line,
int fTransfer, int nTransfer) { int ftransfer, int ntransfer) {
lua_Hook hook = L->hook; lua_Hook hook = L->hook;
if (hook && L->allowhook) { /* make sure there is a hook */ if (hook && L->allowhook) { /* make sure there is a hook */
int mask = CIST_HOOKED; int mask = CIST_HOOKED;
@ -279,10 +279,10 @@ void luaD_hook (lua_State *L, int event, int line,
ar.event = event; ar.event = event;
ar.currentline = line; ar.currentline = line;
ar.i_ci = ci; ar.i_ci = ci;
if (nTransfer != 0) { if (ntransfer != 0) {
mask |= CIST_TRAN; /* 'ci' has transfer information */ mask |= CIST_TRAN; /* 'ci' has transfer information */
ci->u2.transferinfo.fTransfer = fTransfer; ci->u2.transferinfo.ftransfer = ftransfer;
ci->u2.transferinfo.nTransfer = nTransfer; ci->u2.transferinfo.ntransfer = ntransfer;
} }
luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */ luaD_checkstack(L, LUA_MINSTACK); /* ensure minimum stack size */
if (L->top + LUA_MINSTACK > ci->top) if (L->top + LUA_MINSTACK > ci->top)
@ -329,10 +329,10 @@ static void rethook (lua_State *L, CallInfo *ci, StkId firstres, int nres) {
L->top = ci->top; /* correct top */ L->top = ci->top; /* correct top */
} }
if (L->hookmask & LUA_MASKRET) { /* is return hook on? */ if (L->hookmask & LUA_MASKRET) { /* is return hook on? */
int fTransfer; int ftransfer;
ci->func += delta; /* if vararg, back to virtual 'func' */ ci->func += delta; /* if vararg, back to virtual 'func' */
fTransfer = cast(unsigned short, firstres - ci->func); ftransfer = cast(unsigned short, firstres - ci->func);
luaD_hook(L, LUA_HOOKRET, -1, fTransfer, nres); /* call it */ luaD_hook(L, LUA_HOOKRET, -1, ftransfer, nres); /* call it */
ci->func -= delta; ci->func -= delta;
} }
if (isLua(ci->previous)) if (isLua(ci->previous))

View File

@ -1,5 +1,5 @@
/* /*
** $Id: lstate.h,v 2.156 2018/02/17 19:29:29 roberto Exp roberto $ ** $Id: lstate.h,v 2.157 2018/02/25 12:43:52 roberto Exp roberto $
** Global State ** Global State
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -104,8 +104,8 @@ typedef struct CallInfo {
int funcidx; /* called-function index */ int funcidx; /* called-function index */
int nyield; /* number of values yielded */ int nyield; /* number of values yielded */
struct { /* info about transfered values (for call/return hooks) */ struct { /* info about transfered values (for call/return hooks) */
unsigned short fTransfer; /* offset of first value transfered */ unsigned short ftransfer; /* offset of first value transfered */
unsigned short nTransfer; /* number of values transfered */ unsigned short ntransfer; /* number of values transfered */
} transferinfo; } transferinfo;
} u2; } u2;
short nresults; /* expected number of results from this function */ short nresults; /* expected number of results from this function */

6
lua.h
View File

@ -1,5 +1,5 @@
/* /*
** $Id: lua.h,v 1.343 2018/03/02 16:30:47 roberto Exp roberto $ ** $Id: lua.h,v 1.344 2018/03/05 14:15:32 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
@ -461,8 +461,8 @@ struct lua_Debug {
unsigned char nparams;/* (u) number of parameters */ unsigned char nparams;/* (u) number of parameters */
char isvararg; /* (u) */ char isvararg; /* (u) */
char istailcall; /* (t) */ char istailcall; /* (t) */
unsigned short fTransfer;/* (r) index of first value transfered */ unsigned short ftransfer; /* (r) index of first value transferred */
unsigned short nTransfer; /* (r) number of transfered values */ unsigned short ntransfer; /* (r) number of transferred values */
char short_src[LUA_IDSIZE]; /* (S) */ char short_src[LUA_IDSIZE]; /* (S) */
/* private part */ /* private part */
struct CallInfo *i_ci; /* active function */ struct CallInfo *i_ci; /* active function */