global array of ctypes renamed to 'luai_ctype_' (extern names must
use a "lua" prefix...)
This commit is contained in:
4
lctype.c
4
lctype.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: $
|
** $Id: lctype.c,v 1.1 2009/02/19 17:18:25 roberto Exp roberto $
|
||||||
** 'ctype' functions for Lua
|
** 'ctype' functions for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include "lctype.h"
|
#include "lctype.h"
|
||||||
|
|
||||||
const char lctypecode[UCHAR_MAX + 1] = {
|
const char luai_ctype_[UCHAR_MAX + 1] = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
|
0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
|||||||
14
lctype.h
14
lctype.h
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: $
|
** $Id: lctype.h,v 1.1 2009/02/19 17:18:25 roberto Exp roberto $
|
||||||
** 'ctype' functions for Lua
|
** 'ctype' functions for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -22,13 +22,13 @@
|
|||||||
#define MASK(B) (1 << (B))
|
#define MASK(B) (1 << (B))
|
||||||
|
|
||||||
|
|
||||||
#define lisalpha(x) (lctypecode[x] & MASK(ALPHABIT))
|
#define lisalpha(x) (luai_ctype_[x] & MASK(ALPHABIT))
|
||||||
#define lisalnum(x) (lctypecode[x] & (MASK(ALPHABIT) | MASK(DIGITBIT)))
|
#define lisalnum(x) (luai_ctype_[x] & (MASK(ALPHABIT) | MASK(DIGITBIT)))
|
||||||
#define lisdigit(x) (lctypecode[x] & MASK(DIGITBIT))
|
#define lisdigit(x) (luai_ctype_[x] & MASK(DIGITBIT))
|
||||||
#define lisspace(x) (lctypecode[x] & MASK(SPACEBIT))
|
#define lisspace(x) (luai_ctype_[x] & MASK(SPACEBIT))
|
||||||
#define lisprint(x) (lctypecode[x] & MASK(PRINTBIT))
|
#define lisprint(x) (luai_ctype_[x] & MASK(PRINTBIT))
|
||||||
|
|
||||||
LUAI_DATA const char lctypecode[UCHAR_MAX + 1];
|
LUAI_DATA const char luai_ctype_[UCHAR_MAX + 1];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user