Reverted bledthrough changes.
This commit is contained in:
parent
8816131780
commit
ecbdb7a945
|
@ -8,8 +8,6 @@
|
|||
#define API_TYPE_FONT "Font"
|
||||
#define API_TYPE_PROCESS "Process"
|
||||
|
||||
#define API_CONSTANT_DEFINE(L, idx, key, n) (lua_pushnumber(L, n), lua_setfield(L, idx - 1, key))
|
||||
|
||||
void api_load_libs(lua_State *L);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -101,11 +101,17 @@ int luaopen_regex(lua_State *L) {
|
|||
lua_setfield(L, -2, "__name");
|
||||
lua_pushvalue(L, -1);
|
||||
lua_setfield(L, LUA_REGISTRYINDEX, "regex");
|
||||
API_CONSTANT_DEFINE(L, -1, "ANCHORED", PCRE2_ANCHORED);
|
||||
API_CONSTANT_DEFINE(L, -1, "ENDANCHORED", PCRE2_ENDANCHORED);
|
||||
API_CONSTANT_DEFINE(L, -1, "NOTBOL", PCRE2_NOTBOL);
|
||||
API_CONSTANT_DEFINE(L, -1, "NOTEOL", PCRE2_NOTEOL);
|
||||
API_CONSTANT_DEFINE(L, -1, "NOTEMPTY", PCRE2_NOTEMPTY);
|
||||
API_CONSTANT_DEFINE(L, -1, "NOTEMPTY_ATSTART", PCRE2_NOTEMPTY_ATSTART);
|
||||
lua_pushnumber(L, PCRE2_ANCHORED);
|
||||
lua_setfield(L, -2, "ANCHORED");
|
||||
lua_pushnumber(L, PCRE2_ANCHORED) ;
|
||||
lua_setfield(L, -2, "ENDANCHORED");
|
||||
lua_pushnumber(L, PCRE2_NOTBOL);
|
||||
lua_setfield(L, -2, "NOTBOL");
|
||||
lua_pushnumber(L, PCRE2_NOTEOL);
|
||||
lua_setfield(L, -2, "NOTEOL");
|
||||
lua_pushnumber(L, PCRE2_NOTEMPTY);
|
||||
lua_setfield(L, -2, "NOTEMPTY");
|
||||
lua_pushnumber(L, PCRE2_NOTEMPTY_ATSTART);
|
||||
lua_setfield(L, -2, "NOTEMPTY_ATSTART");
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue