aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
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) */