From af6d9f31165a13c34c0601f37ca5a67c365d1d01 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 17 Dec 2018 13:56:22 -0200 Subject: Details A few details in the makefile and in the manual. (In particular, it updates the dependency lists in the makefile.) --- ltests.c | 3 ++- makefile | 23 ++++++++++++----------- manual/manual.of | 16 ++++++++-------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/ltests.c b/ltests.c index a38a8926..0b5ed90b 100644 --- a/ltests.c +++ b/ltests.c @@ -156,7 +156,8 @@ void *debug_realloc (void *ud, void *b, size_t oldsize, size_t size) { size_t realsize = sizeof(Header) + size + MARKSIZE; if (realsize < size) return NULL; /* arithmetic overflow! */ newblock = cast(Header *, malloc(realsize)); /* alloc a new block */ - if (newblock == NULL) return NULL; /* really out of memory? */ + if (newblock == NULL) + return NULL; /* really out of memory? */ if (block) { memcpy(newblock + 1, block + 1, commonsize); /* copy old contents */ freeblock(mc, block); /* erase (and check) old copy */ diff --git a/makefile b/makefile index 1263f7fd..02a0814f 100644 --- a/makefile +++ b/makefile @@ -14,10 +14,11 @@ CWARNSCPP= \ -Wredundant-decls \ -Wdisabled-optimization \ -Wdouble-promotion \ - -Wstrict-aliasing=3 \ - -Wno-aggressive-loop-optimizations \ - -Wlogical-op \ - -Werror \ + #-Wno-aggressive-loop-optimizations \ + #-Wlogical-op \ + #-Wfatal-errors \ + #-Wstrict-aliasing=3 \ + # -Werror \ # -pedantic # warns if we use jump tables \ # the next warnings generate too much noise, so they are disabled # -Wconversion -Wno-sign-conversion \ @@ -39,6 +40,7 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) # -DEXTERNMEMCHECK -DHARDSTACKTESTS -DHARDMEMTESTS -DTRACEMEM='"tempmem"' +# -DMAXINDEXRK=1 # -g -DLUA_USER_H='"ltests.h"' # -pg -malign-double # -DLUA_USE_CTYPE -DLUA_USE_APICHECK @@ -50,7 +52,6 @@ TESTS= -DLUA_USER_H='"ltests.h"' -O0 # LOCAL = $(TESTS) $(CWARNS) -g - # enable Linux goodies MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE MYLDFLAGS= $(LOCAL) -Wl,-E @@ -58,7 +59,7 @@ MYLIBS= -ldl -lreadline CC= gcc -CFLAGS= -Wall -O2 $(MYCFLAGS) -Wfatal-errors -fno-stack-protector -fno-common +CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native AR= ar rc RANLIB= ranlib RM= rm -f @@ -122,7 +123,7 @@ echo: @echo "MYLIBS = $(MYLIBS)" @echo "DL = $(DL)" -$(ALL_O): makefile +$(ALL_O): makefile ltests.h # DO NOT EDIT # automatically made with 'gcc -MM l*.c' @@ -146,8 +147,8 @@ ldo.o: ldo.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ lparser.h lstring.h ltable.h lundump.h lvm.h ldump.o: ldump.c lprefix.h lua.h luaconf.h lobject.h llimits.h lstate.h \ ltm.h lzio.h lmem.h lundump.h -lfunc.o: lfunc.c lprefix.h lua.h luaconf.h lfunc.h lobject.h llimits.h \ - lgc.h lstate.h ltm.h lzio.h lmem.h +lfunc.o: lfunc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ + llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lgc.o: lgc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h linit.o: linit.c lprefix.h lua.h luaconf.h lualib.h lauxlib.h @@ -178,8 +179,8 @@ ltable.o: ltable.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ ltablib.o: ltablib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h ltests.o: ltests.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ lobject.h ltm.h lzio.h lmem.h lauxlib.h lcode.h llex.h lopcodes.h \ - lparser.h lctype.h ldebug.h ldo.h lfunc.h lstring.h lgc.h ltable.h \ - lualib.h + lparser.h lctype.h ldebug.h ldo.h lfunc.h lopnames.h lstring.h lgc.h \ + ltable.h lualib.h ltm.o: ltm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h lua.o: lua.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h diff --git a/manual/manual.of b/manual/manual.of index 862d032b..044bd09c 100644 --- a/manual/manual.of +++ b/manual/manual.of @@ -1027,8 +1027,7 @@ Any kind of end-of-line sequence or newline followed by carriage return) is converted to a simple newline. -For convenience, -when the opening long bracket is immediately followed by a newline, +When the opening long bracket is immediately followed by a newline, the newline is not included in the string. As an example, in a system using ASCII (in which @Char{a} is coded @N{as 97}, @@ -1048,7 +1047,7 @@ alo Any byte in a literal string not explicitly affected by the previous rules represents itself. However, Lua opens files for parsing in text mode, -and the system file functions may have problems with +and the system's file functions may have problems with some control characters. So, it is safer to represent non-text data as a quoted literal with @@ -1782,19 +1781,19 @@ These operators always result in @false or @true. Equality (@T{==}) first compares the type of its operands. If the types are different, then the result is @false. Otherwise, the values of the operands are compared. -Strings are compared in the obvious way. +Strings are equal if they have the same content. Numbers are equal if they denote the same mathematical value. Tables, userdata, and threads are compared by reference: two objects are considered equal only if they are the same object. Every time you create a new object -(a table, userdata, or thread), +(a table, a userdata, or a thread), this new object is different from any previously existing object. -A closure is always equal to itself. -Closures with any detectable difference +A function is always equal to itself. +Functions with any detectable difference (different behavior, different definition) are always different. -Closures created at different times but with no detectable differences +Functions created at different times but with no detectable differences may be classified as equal or not (depending on internal cashing details). @@ -4324,6 +4323,7 @@ The unsigned version of @Lid{lua_Integer}. Returns the pseudo-index that represents the @id{i}-th upvalue of the running function @see{c-closure}. +@id{i} must be in the range @M{[1,256]}. } -- cgit v1.2.1