mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
This reverts commit 55a15c204e
.
This commit is contained in:
parent
6bbb44c165
commit
2bc0901ce3
16 changed files with 20 additions and 557 deletions
15
third_party/lua/lvm.h
vendored
15
third_party/lua/lvm.h
vendored
|
@ -88,13 +88,6 @@ typedef enum {
|
|||
: (slot = f(hvalue(t), k), /* else, do raw access */ \
|
||||
!isempty(slot))) /* result not empty? */
|
||||
|
||||
/* This one supports arrays as well as tables. */
|
||||
#define luaV_fastget2(L,t,k,slot,f) \
|
||||
(ttisarray(t) ? (slot = f(avalue(t), k), !isempty(slot)) : \
|
||||
(!ttistable(t) \
|
||||
? (slot = NULL, 0) /* not a table; 'slot' is NULL and result is 0 */ \
|
||||
: (slot = f(hvalue(t), k), /* else, do raw access */ \
|
||||
!isempty(slot)))) /* result not empty? */
|
||||
|
||||
/*
|
||||
** Special case of 'luaV_fastget' for integers, inlining the fast case
|
||||
|
@ -107,14 +100,6 @@ typedef enum {
|
|||
? &hvalue(t)->array[k - 1] : luaH_getint(hvalue(t), k), \
|
||||
!isempty(slot))) /* result not empty? */
|
||||
|
||||
/* This one supports arrays as well as tables. */
|
||||
#define luaV_fastgeti2(L,t,k,slot) \
|
||||
(ttisarray(t) ? (slot = (l_castS2U(k) - 1u < avalue(t)->sizearray) ? &avalue(t)->array[k - 1] : luaO_nilobject, !isempty(slot)) : \
|
||||
(!ttistable(t) \
|
||||
? (slot = NULL, 0) /* not a table; 'slot' is NULL and result is 0 */ \
|
||||
: (slot = (l_castS2U(k) - 1u < hvalue(t)->sizearray) \
|
||||
? &hvalue(t)->array[k - 1] : luaH_getint(hvalue(t), k), \
|
||||
!isempty(slot)))) /* result not empty? */
|
||||
|
||||
/*
|
||||
** Finish a fast set operation (when fast get succeeds). In that case,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue