external/lua: update to Lua 5.4.7
Update the version of Lua included with Callisto to Lua 5.4.7. Re-generate patches to apply cleanly on top of Lua 5.4.7 sources. Fixes: https://todo.sr.ht/~jeremy/callisto/8
This commit is contained in:
parent
045cb437ba
commit
cdae936548
33 changed files with 371 additions and 266 deletions
18
external/lua/lobject.h
vendored
18
external/lua/lobject.h
vendored
|
@ -386,7 +386,7 @@ typedef struct GCObject {
|
|||
typedef struct TString {
|
||||
CommonHeader;
|
||||
lu_byte extra; /* reserved words for short strings; "has hash" for longs */
|
||||
lu_byte shrlen; /* length for short strings */
|
||||
lu_byte shrlen; /* length for short strings, 0xFF for long strings */
|
||||
unsigned int hash;
|
||||
union {
|
||||
size_t lnglen; /* length for long strings */
|
||||
|
@ -398,19 +398,17 @@ typedef struct TString {
|
|||
|
||||
|
||||
/*
|
||||
** Get the actual string (array of bytes) from a 'TString'.
|
||||
** Get the actual string (array of bytes) from a 'TString'. (Generic
|
||||
** version and specialized versions for long and short strings.)
|
||||
*/
|
||||
#define getstr(ts) ((ts)->contents)
|
||||
#define getstr(ts) ((ts)->contents)
|
||||
#define getlngstr(ts) check_exp((ts)->shrlen == 0xFF, (ts)->contents)
|
||||
#define getshrstr(ts) check_exp((ts)->shrlen != 0xFF, (ts)->contents)
|
||||
|
||||
|
||||
/* get the actual string (array of bytes) from a Lua value */
|
||||
#define svalue(o) getstr(tsvalue(o))
|
||||
|
||||
/* get string length from 'TString *s' */
|
||||
#define tsslen(s) ((s)->tt == LUA_VSHRSTR ? (s)->shrlen : (s)->u.lnglen)
|
||||
|
||||
/* get string length from 'TValue *o' */
|
||||
#define vslen(o) tsslen(tsvalue(o))
|
||||
#define tsslen(s) \
|
||||
((s)->shrlen != 0xFF ? (s)->shrlen : (s)->u.lnglen)
|
||||
|
||||
/* }================================================================== */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue