コード例 #1
0
ファイル: lapi.cpp プロジェクト: Akz-/residual
int32 lua_callfunction(lua_Object function) {
	if (function == LUA_NOOBJECT) {
		return 1;
	} else {
		luaD_openstack((lua_state->stack.top - lua_state->stack.stack) - lua_state->Cstack.base);
		set_normalized(lua_state->stack.stack + lua_state->Cstack.base, Address(function));
		return luaD_protectedrun(MULT_RET);
	}
}
コード例 #2
0
ファイル: lapi.c プロジェクト: Akagi201/learning-lua
int lua_callfunction (lua_Object function)
{
  if (function == LUA_NOOBJECT)
    return 1;
  else {
    luaD_openstack((L->stack.top-L->stack.stack)-L->Cstack.base);
    set_normalized(L->stack.stack+L->Cstack.base, Address(function));
    return luaD_protectedrun();
  }
}
コード例 #3
0
ファイル: ldo.c プロジェクト: Echelon9/soulride
static int do_main (ZIO *z, int bin) {
  int status;
  int debug = L->debug;  /* save debug status */
  do {
    long old_blocks = (luaC_checkGC(), L->nblocks);
    status = protectedparser(z, bin);
    if (status == 1) return 1;  /* error */
    else if (status == 2) return 0;  /* 'natural' end */
    else {
      unsigned long newelems2 = 2*(L->nblocks-old_blocks);
      L->GCthreshold += newelems2;
      status = luaD_protectedrun();
      L->GCthreshold -= newelems2;
    }
  } while (bin && status == 0);
  L->debug = debug;  /* restore debug status */
  return status;
}
コード例 #4
0
ファイル: ldo.cpp プロジェクト: Templier/residual
static int32 do_main(ZIO *z, int32 bin) {
	int32 status;
	do {
		int32 old_blocks = (luaC_checkGC(), nblocks);
		status = protectedparser(z, bin);
		if (status == 1)
			return 1;  // error
		else if (status == 2)
			return 0;  // 'natural' end
		else {
			int32 newelems2 = 2 * (nblocks - old_blocks);
			GCthreshold += newelems2;
			status = luaD_protectedrun(MULT_RET);
			GCthreshold -= newelems2;
		}
	} while (bin && status == 0);
	return status;
}