From f407b3c4a1bc9667867ec51e835c20d97aab55a2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 19 Jul 2024 17:34:22 -0300 Subject: Using CIST_CLSRET instead of trick with 'nresults' The callstatus flag CIST_CLSRET is used in all tests for the presence of variables to be closed in C functions. --- lapi.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'lapi.h') diff --git a/lapi.h b/lapi.h index 21be4a24..9b545344 100644 --- a/lapi.h +++ b/lapi.h @@ -62,20 +62,4 @@ L->tbclist.p < L->top.p - (n), \ "not enough free elements in the stack") - -/* -** To reduce the overhead of returning from C functions, the presence of -** to-be-closed variables in these functions is coded in the CallInfo's -** field 'nresults', in a way that functions with no to-be-closed variables -** with zero, one, or "all" wanted results have no overhead. Functions -** with other number of wanted results, as well as functions with -** variables to be closed, have an extra check. -*/ - -#define hastocloseCfunc(n) ((n) < LUA_MULTRET) - -/* Map [-1, inf) (range of 'nresults') into (-inf, -2] */ -#define codeNresults(n) (-(n) - 3) -#define decodeNresults(n) (-(n) - 3) - #endif -- cgit v1.2.3-55-g6feb