diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-17 13:56:22 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-17 13:56:22 -0200 |
commit | af6d9f31165a13c34c0601f37ca5a67c365d1d01 (patch) | |
tree | b38572c639b77113a06fc8546378a7ca519c919d | |
parent | 2258f3133b27a6a3db703644311e0a59b6c7b0f6 (diff) | |
download | lua-af6d9f31165a13c34c0601f37ca5a67c365d1d01.tar.gz lua-af6d9f31165a13c34c0601f37ca5a67c365d1d01.tar.bz2 lua-af6d9f31165a13c34c0601f37ca5a67c365d1d01.zip |
Details
A few details in the makefile and in the manual. (In particular,
it updates the dependency lists in the makefile.)
-rw-r--r-- | ltests.c | 3 | ||||
-rw-r--r-- | makefile | 23 | ||||
-rw-r--r-- | manual/manual.of | 16 |
3 files changed, 22 insertions, 20 deletions
@@ -156,7 +156,8 @@ void *debug_realloc (void *ud, void *b, size_t oldsize, size_t size) { | |||
156 | size_t realsize = sizeof(Header) + size + MARKSIZE; | 156 | size_t realsize = sizeof(Header) + size + MARKSIZE; |
157 | if (realsize < size) return NULL; /* arithmetic overflow! */ | 157 | if (realsize < size) return NULL; /* arithmetic overflow! */ |
158 | newblock = cast(Header *, malloc(realsize)); /* alloc a new block */ | 158 | newblock = cast(Header *, malloc(realsize)); /* alloc a new block */ |
159 | if (newblock == NULL) return NULL; /* really out of memory? */ | 159 | if (newblock == NULL) |
160 | return NULL; /* really out of memory? */ | ||
160 | if (block) { | 161 | if (block) { |
161 | memcpy(newblock + 1, block + 1, commonsize); /* copy old contents */ | 162 | memcpy(newblock + 1, block + 1, commonsize); /* copy old contents */ |
162 | freeblock(mc, block); /* erase (and check) old copy */ | 163 | freeblock(mc, block); /* erase (and check) old copy */ |
@@ -14,10 +14,11 @@ CWARNSCPP= \ | |||
14 | -Wredundant-decls \ | 14 | -Wredundant-decls \ |
15 | -Wdisabled-optimization \ | 15 | -Wdisabled-optimization \ |
16 | -Wdouble-promotion \ | 16 | -Wdouble-promotion \ |
17 | -Wstrict-aliasing=3 \ | 17 | #-Wno-aggressive-loop-optimizations \ |
18 | -Wno-aggressive-loop-optimizations \ | 18 | #-Wlogical-op \ |
19 | -Wlogical-op \ | 19 | #-Wfatal-errors \ |
20 | -Werror \ | 20 | #-Wstrict-aliasing=3 \ |
21 | # -Werror \ | ||
21 | # -pedantic # warns if we use jump tables \ | 22 | # -pedantic # warns if we use jump tables \ |
22 | # the next warnings generate too much noise, so they are disabled | 23 | # the next warnings generate too much noise, so they are disabled |
23 | # -Wconversion -Wno-sign-conversion \ | 24 | # -Wconversion -Wno-sign-conversion \ |
@@ -39,6 +40,7 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) | |||
39 | 40 | ||
40 | 41 | ||
41 | # -DEXTERNMEMCHECK -DHARDSTACKTESTS -DHARDMEMTESTS -DTRACEMEM='"tempmem"' | 42 | # -DEXTERNMEMCHECK -DHARDSTACKTESTS -DHARDMEMTESTS -DTRACEMEM='"tempmem"' |
43 | # -DMAXINDEXRK=1 | ||
42 | # -g -DLUA_USER_H='"ltests.h"' | 44 | # -g -DLUA_USER_H='"ltests.h"' |
43 | # -pg -malign-double | 45 | # -pg -malign-double |
44 | # -DLUA_USE_CTYPE -DLUA_USE_APICHECK | 46 | # -DLUA_USE_CTYPE -DLUA_USE_APICHECK |
@@ -50,7 +52,6 @@ TESTS= -DLUA_USER_H='"ltests.h"' -O0 | |||
50 | # LOCAL = $(TESTS) $(CWARNS) -g | 52 | # LOCAL = $(TESTS) $(CWARNS) -g |
51 | 53 | ||
52 | 54 | ||
53 | |||
54 | # enable Linux goodies | 55 | # enable Linux goodies |
55 | MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE | 56 | MYCFLAGS= $(LOCAL) -std=c99 -DLUA_USE_LINUX -DLUA_USE_READLINE |
56 | MYLDFLAGS= $(LOCAL) -Wl,-E | 57 | MYLDFLAGS= $(LOCAL) -Wl,-E |
@@ -58,7 +59,7 @@ MYLIBS= -ldl -lreadline | |||
58 | 59 | ||
59 | 60 | ||
60 | CC= gcc | 61 | CC= gcc |
61 | CFLAGS= -Wall -O2 $(MYCFLAGS) -Wfatal-errors -fno-stack-protector -fno-common | 62 | CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native |
62 | AR= ar rc | 63 | AR= ar rc |
63 | RANLIB= ranlib | 64 | RANLIB= ranlib |
64 | RM= rm -f | 65 | RM= rm -f |
@@ -122,7 +123,7 @@ echo: | |||
122 | @echo "MYLIBS = $(MYLIBS)" | 123 | @echo "MYLIBS = $(MYLIBS)" |
123 | @echo "DL = $(DL)" | 124 | @echo "DL = $(DL)" |
124 | 125 | ||
125 | $(ALL_O): makefile | 126 | $(ALL_O): makefile ltests.h |
126 | 127 | ||
127 | # DO NOT EDIT | 128 | # DO NOT EDIT |
128 | # automatically made with 'gcc -MM l*.c' | 129 | # 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 \ | |||
146 | lparser.h lstring.h ltable.h lundump.h lvm.h | 147 | lparser.h lstring.h ltable.h lundump.h lvm.h |
147 | ldump.o: ldump.c lprefix.h lua.h luaconf.h lobject.h llimits.h lstate.h \ | 148 | ldump.o: ldump.c lprefix.h lua.h luaconf.h lobject.h llimits.h lstate.h \ |
148 | ltm.h lzio.h lmem.h lundump.h | 149 | ltm.h lzio.h lmem.h lundump.h |
149 | lfunc.o: lfunc.c lprefix.h lua.h luaconf.h lfunc.h lobject.h llimits.h \ | 150 | lfunc.o: lfunc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ |
150 | lgc.h lstate.h ltm.h lzio.h lmem.h | 151 | llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h |
151 | lgc.o: lgc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | 152 | lgc.o: lgc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ |
152 | llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h | 153 | llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h |
153 | linit.o: linit.c lprefix.h lua.h luaconf.h lualib.h lauxlib.h | 154 | 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 \ | |||
178 | ltablib.o: ltablib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | 179 | ltablib.o: ltablib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h |
179 | ltests.o: ltests.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ | 180 | ltests.o: ltests.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \ |
180 | lobject.h ltm.h lzio.h lmem.h lauxlib.h lcode.h llex.h lopcodes.h \ | 181 | lobject.h ltm.h lzio.h lmem.h lauxlib.h lcode.h llex.h lopcodes.h \ |
181 | lparser.h lctype.h ldebug.h ldo.h lfunc.h lstring.h lgc.h ltable.h \ | 182 | lparser.h lctype.h ldebug.h ldo.h lfunc.h lopnames.h lstring.h lgc.h \ |
182 | lualib.h | 183 | ltable.h lualib.h |
183 | ltm.o: ltm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ | 184 | ltm.o: ltm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \ |
184 | llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h | 185 | llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h |
185 | lua.o: lua.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h | 186 | 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 | |||
1027 | or newline followed by carriage return) | 1027 | or newline followed by carriage return) |
1028 | is converted to a simple newline. | 1028 | is converted to a simple newline. |
1029 | 1029 | ||
1030 | For convenience, | 1030 | When the opening long bracket is immediately followed by a newline, |
1031 | when the opening long bracket is immediately followed by a newline, | ||
1032 | the newline is not included in the string. | 1031 | the newline is not included in the string. |
1033 | As an example, in a system using ASCII | 1032 | As an example, in a system using ASCII |
1034 | (in which @Char{a} is coded @N{as 97}, | 1033 | (in which @Char{a} is coded @N{as 97}, |
@@ -1048,7 +1047,7 @@ alo | |||
1048 | Any byte in a literal string not | 1047 | Any byte in a literal string not |
1049 | explicitly affected by the previous rules represents itself. | 1048 | explicitly affected by the previous rules represents itself. |
1050 | However, Lua opens files for parsing in text mode, | 1049 | However, Lua opens files for parsing in text mode, |
1051 | and the system file functions may have problems with | 1050 | and the system's file functions may have problems with |
1052 | some control characters. | 1051 | some control characters. |
1053 | So, it is safer to represent | 1052 | So, it is safer to represent |
1054 | non-text data as a quoted literal with | 1053 | non-text data as a quoted literal with |
@@ -1782,19 +1781,19 @@ These operators always result in @false or @true. | |||
1782 | Equality (@T{==}) first compares the type of its operands. | 1781 | Equality (@T{==}) first compares the type of its operands. |
1783 | If the types are different, then the result is @false. | 1782 | If the types are different, then the result is @false. |
1784 | Otherwise, the values of the operands are compared. | 1783 | Otherwise, the values of the operands are compared. |
1785 | Strings are compared in the obvious way. | 1784 | Strings are equal if they have the same content. |
1786 | Numbers are equal if they denote the same mathematical value. | 1785 | Numbers are equal if they denote the same mathematical value. |
1787 | 1786 | ||
1788 | Tables, userdata, and threads | 1787 | Tables, userdata, and threads |
1789 | are compared by reference: | 1788 | are compared by reference: |
1790 | two objects are considered equal only if they are the same object. | 1789 | two objects are considered equal only if they are the same object. |
1791 | Every time you create a new object | 1790 | Every time you create a new object |
1792 | (a table, userdata, or thread), | 1791 | (a table, a userdata, or a thread), |
1793 | this new object is different from any previously existing object. | 1792 | this new object is different from any previously existing object. |
1794 | A closure is always equal to itself. | 1793 | A function is always equal to itself. |
1795 | Closures with any detectable difference | 1794 | Functions with any detectable difference |
1796 | (different behavior, different definition) are always different. | 1795 | (different behavior, different definition) are always different. |
1797 | Closures created at different times but with no detectable differences | 1796 | Functions created at different times but with no detectable differences |
1798 | may be classified as equal or not | 1797 | may be classified as equal or not |
1799 | (depending on internal cashing details). | 1798 | (depending on internal cashing details). |
1800 | 1799 | ||
@@ -4324,6 +4323,7 @@ The unsigned version of @Lid{lua_Integer}. | |||
4324 | 4323 | ||
4325 | Returns the pseudo-index that represents the @id{i}-th upvalue of | 4324 | Returns the pseudo-index that represents the @id{i}-th upvalue of |
4326 | the running function @see{c-closure}. | 4325 | the running function @see{c-closure}. |
4326 | @id{i} must be in the range @M{[1,256]}. | ||
4327 | 4327 | ||
4328 | } | 4328 | } |
4329 | 4329 | ||