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.
This commit is contained in:
Roberto Ierusalimschy
2024-06-20 13:43:33 -03:00
parent 97ef8e7bd4
commit 55ac40f859
19 changed files with 159 additions and 165 deletions

View File

@@ -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