diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-07-07 15:02:09 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-07-07 15:02:09 -0300 |
commit | 03d672a95cfd287855b373587f3975165eab9e02 (patch) | |
tree | ccaf9a66b54ab44d660d5257f3df649bb79664ad | |
parent | 03bf7fdd4f3a588cd7ff0a8c51ed68c596d3d575 (diff) | |
download | lua-03d672a95cfd287855b373587f3975165eab9e02.tar.gz lua-03d672a95cfd287855b373587f3975165eab9e02.tar.bz2 lua-03d672a95cfd287855b373587f3975165eab9e02.zip |
Details (comments)
-rw-r--r-- | lapi.c | 2 | ||||
-rw-r--r-- | lctype.c | 2 | ||||
-rw-r--r-- | lobject.c | 2 | ||||
-rw-r--r-- | luaconf.h | 6 | ||||
-rw-r--r-- | lutf8lib.c | 4 |
5 files changed, 8 insertions, 8 deletions
@@ -679,7 +679,7 @@ static int auxgetstr (lua_State *L, const TValue *t, const char *k) { | |||
679 | 679 | ||
680 | /* | 680 | /* |
681 | ** The following function assumes that the registry cannot be a weak | 681 | ** The following function assumes that the registry cannot be a weak |
682 | ** table, so that en mergency collection while using the global table | 682 | ** table; so, an emergency collection while using the global table |
683 | ** cannot collect it. | 683 | ** cannot collect it. |
684 | */ | 684 | */ |
685 | static void getGlobalTable (lua_State *L, TValue *gt) { | 685 | static void getGlobalTable (lua_State *L, TValue *gt) { |
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | 19 | ||
20 | #if defined (LUA_UCID) /* accept UniCode IDentifiers? */ | 20 | #if defined (LUA_UCID) /* accept UniCode IDentifiers? */ |
21 | /* consider all non-ascii codepoints to be alphabetic */ | 21 | /* consider all non-ASCII codepoints to be alphabetic */ |
22 | #define NONA 0x01 | 22 | #define NONA 0x01 |
23 | #else | 23 | #else |
24 | #define NONA 0x00 /* default */ | 24 | #define NONA 0x00 /* default */ |
@@ -385,7 +385,7 @@ size_t luaO_str2num (const char *s, TValue *o) { | |||
385 | int luaO_utf8esc (char *buff, l_uint32 x) { | 385 | int luaO_utf8esc (char *buff, l_uint32 x) { |
386 | int n = 1; /* number of bytes put in buffer (backwards) */ | 386 | int n = 1; /* number of bytes put in buffer (backwards) */ |
387 | lua_assert(x <= 0x7FFFFFFFu); | 387 | lua_assert(x <= 0x7FFFFFFFu); |
388 | if (x < 0x80) /* ascii? */ | 388 | if (x < 0x80) /* ASCII? */ |
389 | buff[UTF8BUFFSZ - 1] = cast_char(x); | 389 | buff[UTF8BUFFSZ - 1] = cast_char(x); |
390 | else { /* need continuation bytes */ | 390 | else { /* need continuation bytes */ |
391 | unsigned int mfb = 0x3f; /* maximum that fits in first byte */ | 391 | unsigned int mfb = 0x3f; /* maximum that fits in first byte */ |
@@ -59,7 +59,7 @@ | |||
59 | 59 | ||
60 | 60 | ||
61 | /* | 61 | /* |
62 | ** When Posix DLL ('LUA_USE_DLOPEN') is enabled, the Lua stand-alone | 62 | ** When POSIX DLL ('LUA_USE_DLOPEN') is enabled, the Lua stand-alone |
63 | ** application will try to dynamically link a 'readline' facility | 63 | ** application will try to dynamically link a 'readline' facility |
64 | ** for its REPL. In that case, LUA_READLINELIB is the name of the | 64 | ** for its REPL. In that case, LUA_READLINELIB is the name of the |
65 | ** library it will look for those facilities. If lua.c cannot open | 65 | ** library it will look for those facilities. If lua.c cannot open |
@@ -76,7 +76,7 @@ | |||
76 | 76 | ||
77 | #if defined(LUA_USE_MACOSX) | 77 | #if defined(LUA_USE_MACOSX) |
78 | #define LUA_USE_POSIX | 78 | #define LUA_USE_POSIX |
79 | #define LUA_USE_DLOPEN /* MacOS does not need -ldl */ | 79 | #define LUA_USE_DLOPEN /* macOS does not need -ldl */ |
80 | #define LUA_READLINELIB "libedit.dylib" | 80 | #define LUA_READLINELIB "libedit.dylib" |
81 | #endif | 81 | #endif |
82 | 82 | ||
@@ -88,7 +88,7 @@ | |||
88 | 88 | ||
89 | 89 | ||
90 | #if defined(LUA_USE_C89) && defined(LUA_USE_POSIX) | 90 | #if defined(LUA_USE_C89) && defined(LUA_USE_POSIX) |
91 | #error "Posix is not compatible with C89" | 91 | #error "POSIX is not compatible with C89" |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | 94 | ||
@@ -47,7 +47,7 @@ static lua_Integer u_posrelat (lua_Integer pos, size_t len) { | |||
47 | ** Decode one UTF-8 sequence, returning NULL if byte sequence is | 47 | ** Decode one UTF-8 sequence, returning NULL if byte sequence is |
48 | ** invalid. The array 'limits' stores the minimum value for each | 48 | ** invalid. The array 'limits' stores the minimum value for each |
49 | ** sequence length, to check for overlong representations. Its first | 49 | ** sequence length, to check for overlong representations. Its first |
50 | ** entry forces an error for non-ascii bytes with no continuation | 50 | ** entry forces an error for non-ASCII bytes with no continuation |
51 | ** bytes (count == 0). | 51 | ** bytes (count == 0). |
52 | */ | 52 | */ |
53 | static const char *utf8_decode (const char *s, l_uint32 *val, int strict) { | 53 | static const char *utf8_decode (const char *s, l_uint32 *val, int strict) { |
@@ -55,7 +55,7 @@ static const char *utf8_decode (const char *s, l_uint32 *val, int strict) { | |||
55 | {~(l_uint32)0, 0x80, 0x800, 0x10000u, 0x200000u, 0x4000000u}; | 55 | {~(l_uint32)0, 0x80, 0x800, 0x10000u, 0x200000u, 0x4000000u}; |
56 | unsigned int c = (unsigned char)s[0]; | 56 | unsigned int c = (unsigned char)s[0]; |
57 | l_uint32 res = 0; /* final result */ | 57 | l_uint32 res = 0; /* final result */ |
58 | if (c < 0x80) /* ascii? */ | 58 | if (c < 0x80) /* ASCII? */ |
59 | res = c; | 59 | res = c; |
60 | else { | 60 | else { |
61 | int count = 0; /* to count number of continuation bytes */ | 61 | int count = 0; /* to count number of continuation bytes */ |