summaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-30 10:18:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-10-30 10:18:54 -0300
commit94cbe4651156a84dd9114d7daaa61acd050adbe0 (patch)
tree38828b49afc061309c475c0ca6a05605ceefef1a /ldo.c
parent69b71a69197de0cb6f7f58f5d7c55d9a9a6e529d (diff)
downloadlua-github-94cbe4651156a84dd9114d7daaa61acd050adbe0.tar.gz
Details
- small corrections in the manual - ldo.c: 'docall' -> 'ccall' ('docall' already used in 'lua.c') - comments
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ldo.c b/ldo.c
index 5729b190..a60972b2 100644
--- a/ldo.c
+++ b/ldo.c
@@ -534,11 +534,11 @@ CallInfo *luaD_precall (lua_State *L, StkId func, int nresults) {
/*
-** Call a function (C or Lua). 'inc' can be 1 (increment number
-** of recursive invocations in the C stack) or nyci (the same plus
-** increment number of non-yieldable calls).
+** Call a function (C or Lua) through C. 'inc' can be 1 (increment
+** number of recursive invocations in the C stack) or nyci (the same
+** plus increment number of non-yieldable calls).
*/
-static void docall (lua_State *L, StkId func, int nResults, int inc) {
+static void ccall (lua_State *L, StkId func, int nResults, int inc) {
CallInfo *ci;
L->nCcalls += inc;
if (unlikely(getCcalls(L) >= LUAI_MAXCCALLS))
@@ -552,10 +552,10 @@ static void docall (lua_State *L, StkId func, int nResults, int inc) {
/*
-** External interface for 'docall'
+** External interface for 'ccall'
*/
void luaD_call (lua_State *L, StkId func, int nResults) {
- return docall(L, func, nResults, 1);
+ ccall(L, func, nResults, 1);
}
@@ -563,7 +563,7 @@ void luaD_call (lua_State *L, StkId func, int nResults) {
** Similar to 'luaD_call', but does not allow yields during the call.
*/
void luaD_callnoyield (lua_State *L, StkId func, int nResults) {
- return docall(L, func, nResults, nyci);
+ ccall(L, func, nResults, nyci);
}
@@ -678,7 +678,7 @@ static void resume (lua_State *L, void *ud) {
StkId firstArg = L->top - n; /* first argument */
CallInfo *ci = L->ci;
if (L->status == LUA_OK) /* starting a coroutine? */
- docall(L, firstArg - 1, LUA_MULTRET, 1); /* just call its body */
+ ccall(L, firstArg - 1, LUA_MULTRET, 1); /* just call its body */
else { /* resuming from previous yield */
lua_assert(L->status == LUA_YIELD);
L->status = LUA_OK; /* mark that it is running (again) */