aboutsummaryrefslogtreecommitdiff
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-94cbe4651156a84dd9114d7daaa61acd050adbe0.tar.gz
lua-94cbe4651156a84dd9114d7daaa61acd050adbe0.tar.bz2
lua-94cbe4651156a84dd9114d7daaa61acd050adbe0.zip
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) {
534 534
535 535
536/* 536/*
537** Call a function (C or Lua). 'inc' can be 1 (increment number 537** Call a function (C or Lua) through C. 'inc' can be 1 (increment
538** of recursive invocations in the C stack) or nyci (the same plus 538** number of recursive invocations in the C stack) or nyci (the same
539** increment number of non-yieldable calls). 539** plus increment number of non-yieldable calls).
540*/ 540*/
541static void docall (lua_State *L, StkId func, int nResults, int inc) { 541static void ccall (lua_State *L, StkId func, int nResults, int inc) {
542 CallInfo *ci; 542 CallInfo *ci;
543 L->nCcalls += inc; 543 L->nCcalls += inc;
544 if (unlikely(getCcalls(L) >= LUAI_MAXCCALLS)) 544 if (unlikely(getCcalls(L) >= LUAI_MAXCCALLS))
@@ -552,10 +552,10 @@ static void docall (lua_State *L, StkId func, int nResults, int inc) {
552 552
553 553
554/* 554/*
555** External interface for 'docall' 555** External interface for 'ccall'
556*/ 556*/
557void luaD_call (lua_State *L, StkId func, int nResults) { 557void luaD_call (lua_State *L, StkId func, int nResults) {
558 return docall(L, func, nResults, 1); 558 ccall(L, func, nResults, 1);
559} 559}
560 560
561 561
@@ -563,7 +563,7 @@ void luaD_call (lua_State *L, StkId func, int nResults) {
563** Similar to 'luaD_call', but does not allow yields during the call. 563** Similar to 'luaD_call', but does not allow yields during the call.
564*/ 564*/
565void luaD_callnoyield (lua_State *L, StkId func, int nResults) { 565void luaD_callnoyield (lua_State *L, StkId func, int nResults) {
566 return docall(L, func, nResults, nyci); 566 ccall(L, func, nResults, nyci);
567} 567}
568 568
569 569
@@ -678,7 +678,7 @@ static void resume (lua_State *L, void *ud) {
678 StkId firstArg = L->top - n; /* first argument */ 678 StkId firstArg = L->top - n; /* first argument */
679 CallInfo *ci = L->ci; 679 CallInfo *ci = L->ci;
680 if (L->status == LUA_OK) /* starting a coroutine? */ 680 if (L->status == LUA_OK) /* starting a coroutine? */
681 docall(L, firstArg - 1, LUA_MULTRET, 1); /* just call its body */ 681 ccall(L, firstArg - 1, LUA_MULTRET, 1); /* just call its body */
682 else { /* resuming from previous yield */ 682 else { /* resuming from previous yield */
683 lua_assert(L->status == LUA_YIELD); 683 lua_assert(L->status == LUA_YIELD);
684 L->status = LUA_OK; /* mark that it is running (again) */ 684 L->status = LUA_OK; /* mark that it is running (again) */