Details (comments)
This commit is contained in:
2
lapi.c
2
lapi.c
@@ -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
|
** 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.
|
** cannot collect it.
|
||||||
*/
|
*/
|
||||||
static void getGlobalTable (lua_State *L, TValue *gt) {
|
static void getGlobalTable (lua_State *L, TValue *gt) {
|
||||||
|
|||||||
2
lctype.c
2
lctype.c
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#if defined (LUA_UCID) /* accept UniCode IDentifiers? */
|
#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
|
#define NONA 0x01
|
||||||
#else
|
#else
|
||||||
#define NONA 0x00 /* default */
|
#define NONA 0x00 /* default */
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ size_t luaO_str2num (const char *s, TValue *o) {
|
|||||||
int luaO_utf8esc (char *buff, l_uint32 x) {
|
int luaO_utf8esc (char *buff, l_uint32 x) {
|
||||||
int n = 1; /* number of bytes put in buffer (backwards) */
|
int n = 1; /* number of bytes put in buffer (backwards) */
|
||||||
lua_assert(x <= 0x7FFFFFFFu);
|
lua_assert(x <= 0x7FFFFFFFu);
|
||||||
if (x < 0x80) /* ascii? */
|
if (x < 0x80) /* ASCII? */
|
||||||
buff[UTF8BUFFSZ - 1] = cast_char(x);
|
buff[UTF8BUFFSZ - 1] = cast_char(x);
|
||||||
else { /* need continuation bytes */
|
else { /* need continuation bytes */
|
||||||
unsigned int mfb = 0x3f; /* maximum that fits in first byte */
|
unsigned int mfb = 0x3f; /* maximum that fits in first byte */
|
||||||
|
|||||||
@@ -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
|
** application will try to dynamically link a 'readline' facility
|
||||||
** for its REPL. In that case, LUA_READLINELIB is the name of the
|
** 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
|
** library it will look for those facilities. If lua.c cannot open
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
#if defined(LUA_USE_MACOSX)
|
#if defined(LUA_USE_MACOSX)
|
||||||
#define LUA_USE_POSIX
|
#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"
|
#define LUA_READLINELIB "libedit.dylib"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#if defined(LUA_USE_C89) && defined(LUA_USE_POSIX)
|
#if defined(LUA_USE_C89) && defined(LUA_USE_POSIX)
|
||||||
#error "Posix is not compatible with C89"
|
#error "POSIX is not compatible with C89"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
** Decode one UTF-8 sequence, returning NULL if byte sequence is
|
||||||
** invalid. The array 'limits' stores the minimum value for each
|
** invalid. The array 'limits' stores the minimum value for each
|
||||||
** sequence length, to check for overlong representations. Its first
|
** 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).
|
** bytes (count == 0).
|
||||||
*/
|
*/
|
||||||
static const char *utf8_decode (const char *s, l_uint32 *val, int strict) {
|
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};
|
{~(l_uint32)0, 0x80, 0x800, 0x10000u, 0x200000u, 0x4000000u};
|
||||||
unsigned int c = (unsigned char)s[0];
|
unsigned int c = (unsigned char)s[0];
|
||||||
l_uint32 res = 0; /* final result */
|
l_uint32 res = 0; /* final result */
|
||||||
if (c < 0x80) /* ascii? */
|
if (c < 0x80) /* ASCII? */
|
||||||
res = c;
|
res = c;
|
||||||
else {
|
else {
|
||||||
int count = 0; /* to count number of continuation bytes */
|
int count = 0; /* to count number of continuation bytes */
|
||||||
|
|||||||
Reference in New Issue
Block a user