Details (comments)

This commit is contained in:
Roberto Ierusalimschy
2025-07-07 15:02:09 -03:00
parent 03bf7fdd4f
commit 03d672a95c
5 changed files with 8 additions and 8 deletions

2
lapi.c
View File

@@ -679,7 +679,7 @@ static int auxgetstr (lua_State *L, const TValue *t, const char *k) {
/*
** The following function assumes that the registry cannot be a weak
** table, so that en mergency collection while using the global table
** table; so, an emergency collection while using the global table
** cannot collect it.
*/
static void getGlobalTable (lua_State *L, TValue *gt) {

View File

@@ -18,7 +18,7 @@
#if defined (LUA_UCID) /* accept UniCode IDentifiers? */
/* consider all non-ascii codepoints to be alphabetic */
/* consider all non-ASCII codepoints to be alphabetic */
#define NONA 0x01
#else
#define NONA 0x00 /* default */

View File

@@ -385,7 +385,7 @@ size_t luaO_str2num (const char *s, TValue *o) {
int luaO_utf8esc (char *buff, l_uint32 x) {
int n = 1; /* number of bytes put in buffer (backwards) */
lua_assert(x <= 0x7FFFFFFFu);
if (x < 0x80) /* ascii? */
if (x < 0x80) /* ASCII? */
buff[UTF8BUFFSZ - 1] = cast_char(x);
else { /* need continuation bytes */
unsigned int mfb = 0x3f; /* maximum that fits in first byte */

View File

@@ -59,7 +59,7 @@
/*
** When Posix DLL ('LUA_USE_DLOPEN') is enabled, the Lua stand-alone
** When POSIX DLL ('LUA_USE_DLOPEN') is enabled, the Lua stand-alone
** application will try to dynamically link a 'readline' facility
** for its REPL. In that case, LUA_READLINELIB is the name of the
** library it will look for those facilities. If lua.c cannot open
@@ -76,7 +76,7 @@
#if defined(LUA_USE_MACOSX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* MacOS does not need -ldl */
#define LUA_USE_DLOPEN /* macOS does not need -ldl */
#define LUA_READLINELIB "libedit.dylib"
#endif
@@ -88,7 +88,7 @@
#if defined(LUA_USE_C89) && defined(LUA_USE_POSIX)
#error "Posix is not compatible with C89"
#error "POSIX is not compatible with C89"
#endif

View File

@@ -47,7 +47,7 @@ static lua_Integer u_posrelat (lua_Integer pos, size_t len) {
** Decode one UTF-8 sequence, returning NULL if byte sequence is
** invalid. The array 'limits' stores the minimum value for each
** sequence length, to check for overlong representations. Its first
** entry forces an error for non-ascii bytes with no continuation
** entry forces an error for non-ASCII bytes with no continuation
** bytes (count == 0).
*/
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) {
{~(l_uint32)0, 0x80, 0x800, 0x10000u, 0x200000u, 0x4000000u};
unsigned int c = (unsigned char)s[0];
l_uint32 res = 0; /* final result */
if (c < 0x80) /* ascii? */
if (c < 0x80) /* ASCII? */
res = c;
else {
int count = 0; /* to count number of continuation bytes */