aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2026-04-28 13:44:29 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2026-04-28 13:44:29 -0300
commit0da6d320f757bc9241a33df06f3597598845cf0a (patch)
treecf079dcc2794de6d4bb7a22726932f2511c37ade
parentae23e726018bd31a25c1279600328d90207ec81c (diff)
downloadlua-0da6d320f757bc9241a33df06f3597598845cf0a.tar.gz
lua-0da6d320f757bc9241a33df06f3597598845cf0a.tar.bz2
lua-0da6d320f757bc9241a33df06f3597598845cf0a.zip
Details
-rw-r--r--lcode.c8
-rw-r--r--makefile9
-rwxr-xr-xmanual/2html2
3 files changed, 12 insertions, 7 deletions
diff --git a/lcode.c b/lcode.c
index 33cbd687..e0024432 100644
--- a/lcode.c
+++ b/lcode.c
@@ -663,11 +663,11 @@ static int boolT (FuncState *fs) {
663** Add nil to list of constants and return its index. 663** Add nil to list of constants and return its index.
664*/ 664*/
665static int nilK (FuncState *fs) { 665static int nilK (FuncState *fs) {
666 TValue k, v; 666 lua_State *L = fs->ls->L;
667 setnilvalue(&v); 667 TValue k;
668 /* cannot use nil as key; instead use table itself */ 668 /* cannot use nil as key; instead use table itself */
669 sethvalue(fs->ls->L, &k, fs->kcache); 669 sethvalue(L, &k, fs->kcache);
670 return k2proto(fs, &k, &v); 670 return k2proto(fs, &k, &G(L)->nilvalue);
671} 671}
672 672
673 673
diff --git a/makefile b/makefile
index fa165bca..8144dcb6 100644
--- a/makefile
+++ b/makefile
@@ -62,8 +62,11 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) $(CWARNGCC)
62# ASAN_OPTIONS="detect_invalid_pointer_pairs=2". 62# ASAN_OPTIONS="detect_invalid_pointer_pairs=2".
63# -fsanitize=undefined (you may need to add "-lubsan" to libs) 63# -fsanitize=undefined (you may need to add "-lubsan" to libs)
64# -fsanitize=pointer-subtract -fsanitize=address -fsanitize=pointer-compare 64# -fsanitize=pointer-subtract -fsanitize=address -fsanitize=pointer-compare
65# TESTS= -DLUA_USER_H='"ltests.h"' -Og -g
66 65
66# Test mode: Add test library, turn on asserts, redefine several
67# constants ("to give some bugs a chance"), track memory use, and add
68# debug information.
69# TESTS= -DLUA_USER_H='"ltests.h"' -Og -g
67 70
68LOCAL = $(TESTS) $(CWARNS) 71LOCAL = $(TESTS) $(CWARNS)
69 72
@@ -71,13 +74,15 @@ LOCAL = $(TESTS) $(CWARNS)
71# To enable Linux goodies, -DLUA_USE_LINUX 74# To enable Linux goodies, -DLUA_USE_LINUX
72# For C89, "-std=c89 -DLUA_USE_C89" 75# For C89, "-std=c89 -DLUA_USE_C89"
73# Note that Linux/Posix options are not compatible with C89 76# Note that Linux/Posix options are not compatible with C89
77# (For 32-bit, add option "-m32" to MYCFLAGS and MYLDFLAGS.)
74MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX 78MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX
75MYLDFLAGS= -Wl,-E 79MYLDFLAGS= -Wl,-E
76MYLIBS= -ldl 80MYLIBS= -ldl
77 81
78 82
79CC= gcc 83CC= gcc
80CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native 84# (Optionally we can use -march=native -mno-avx512f.)
85CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common
81AR= ar rc 86AR= ar rc
82RANLIB= ranlib 87RANLIB= ranlib
83RM= rm -f 88RM= rm -f
diff --git a/manual/2html b/manual/2html
index d3b88b34..243f3f22 100755
--- a/manual/2html
+++ b/manual/2html
@@ -1,4 +1,4 @@
1#!/usr/bin/env lua5.3 1#!/usr/bin/env lua
2 2
3 3
4-- special marks: 4-- special marks: