From 55ac40f859ad8e28fe71a8801d49f4a4140e8aa3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 20 Jun 2024 13:43:33 -0300 Subject: Cleaning of llimits.h Several definitions that don't need to be "global" (that is, that concerns only specific parts of the code) moved out of llimits.h, to more appropriate places. --- lstate.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index c3422589..8df86bf5 100644 --- a/lstate.c +++ b/lstate.c @@ -51,6 +51,27 @@ typedef struct LG { #define fromstate(L) (cast(LX *, cast(lu_byte *, (L)) - offsetof(LX, l))) +/* +** these macros allow user-specific actions when a thread is +** created/deleted +*/ +#if !defined(luai_userstateopen) +#define luai_userstateopen(L) ((void)L) +#endif + +#if !defined(luai_userstateclose) +#define luai_userstateclose(L) ((void)L) +#endif + +#if !defined(luai_userstatethread) +#define luai_userstatethread(L,L1) ((void)L) +#endif + +#if !defined(luai_userstatefree) +#define luai_userstatefree(L,L1) ((void)L) +#endif + + /* ** set GCdebt to a new value keeping the real number of allocated ** objects (totalobjs - GCdebt) invariant and avoiding overflows in -- cgit v1.2.3-55-g6feb