mirror of
https://github.com/lua/lua.git
synced 2026-06-08 08:03:49 +00:00
Details
This commit is contained in:
8
lcode.c
8
lcode.c
@@ -663,11 +663,11 @@ static int boolT (FuncState *fs) {
|
|||||||
** Add nil to list of constants and return its index.
|
** Add nil to list of constants and return its index.
|
||||||
*/
|
*/
|
||||||
static int nilK (FuncState *fs) {
|
static int nilK (FuncState *fs) {
|
||||||
TValue k, v;
|
lua_State *L = fs->ls->L;
|
||||||
setnilvalue(&v);
|
TValue k;
|
||||||
/* cannot use nil as key; instead use table itself */
|
/* cannot use nil as key; instead use table itself */
|
||||||
sethvalue(fs->ls->L, &k, fs->kcache);
|
sethvalue(L, &k, fs->kcache);
|
||||||
return k2proto(fs, &k, &v);
|
return k2proto(fs, &k, &G(L)->nilvalue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
9
makefile
9
makefile
@@ -62,8 +62,11 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) $(CWARNGCC)
|
|||||||
# ASAN_OPTIONS="detect_invalid_pointer_pairs=2".
|
# ASAN_OPTIONS="detect_invalid_pointer_pairs=2".
|
||||||
# -fsanitize=undefined (you may need to add "-lubsan" to libs)
|
# -fsanitize=undefined (you may need to add "-lubsan" to libs)
|
||||||
# -fsanitize=pointer-subtract -fsanitize=address -fsanitize=pointer-compare
|
# -fsanitize=pointer-subtract -fsanitize=address -fsanitize=pointer-compare
|
||||||
# TESTS= -DLUA_USER_H='"ltests.h"' -Og -g
|
|
||||||
|
|
||||||
|
# Test mode: Add test library, turn on asserts, redefine several
|
||||||
|
# constants ("to give some bugs a chance"), track memory use, and add
|
||||||
|
# debug information.
|
||||||
|
# TESTS= -DLUA_USER_H='"ltests.h"' -Og -g
|
||||||
|
|
||||||
LOCAL = $(TESTS) $(CWARNS)
|
LOCAL = $(TESTS) $(CWARNS)
|
||||||
|
|
||||||
@@ -71,13 +74,15 @@ LOCAL = $(TESTS) $(CWARNS)
|
|||||||
# To enable Linux goodies, -DLUA_USE_LINUX
|
# To enable Linux goodies, -DLUA_USE_LINUX
|
||||||
# For C89, "-std=c89 -DLUA_USE_C89"
|
# For C89, "-std=c89 -DLUA_USE_C89"
|
||||||
# Note that Linux/Posix options are not compatible with C89
|
# Note that Linux/Posix options are not compatible with C89
|
||||||
|
# (For 32-bit, add option "-m32" to MYCFLAGS and MYLDFLAGS.)
|
||||||
MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX
|
MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX
|
||||||
MYLDFLAGS= -Wl,-E
|
MYLDFLAGS= -Wl,-E
|
||||||
MYLIBS= -ldl
|
MYLIBS= -ldl
|
||||||
|
|
||||||
|
|
||||||
CC= gcc
|
CC= gcc
|
||||||
CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native
|
# (Optionally we can use -march=native -mno-avx512f.)
|
||||||
|
CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common
|
||||||
AR= ar rc
|
AR= ar rc
|
||||||
RANLIB= ranlib
|
RANLIB= ranlib
|
||||||
RM= rm -f
|
RM= rm -f
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env lua5.3
|
#!/usr/bin/env lua
|
||||||
|
|
||||||
|
|
||||||
-- special marks:
|
-- special marks:
|
||||||
|
|||||||
Reference in New Issue
Block a user