diff options
author | 2016-04-05 20:43:21 -0400 | |
---|---|---|
committer | 2016-04-05 20:43:21 -0400 | |
commit | 91d12dbb8c7ba0a155241bd056b1702b8e6fee72 (patch) | |
tree | fad41de476949332fc0a83cfa088a9daf51f0af1 /src/lutf8libext.patch | |
parent | 0c4915da62a96bf6db20377ce11fa887b6271ad9 (diff) | |
download | textadept-91d12dbb8c7ba0a155241bd056b1702b8e6fee72.tar.gz textadept-91d12dbb8c7ba0a155241bd056b1702b8e6fee72.zip |
Import Lua UTF-8 pattern functions directly into `utf8` library from C.
Diffstat (limited to 'src/lutf8libext.patch')
-rw-r--r-- | src/lutf8libext.patch | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/lutf8libext.patch b/src/lutf8libext.patch index ab881928..5dd975ce 100644 --- a/src/lutf8libext.patch +++ b/src/lutf8libext.patch @@ -123,12 +123,17 @@ ENTRY(find), ENTRY(gmatch), ENTRY(gsub), -@@ -1301,11 +1319,13 @@ - luaL_newlib(L, libs); +@@ -1297,15 +1315,17 @@ + { NULL, NULL } + }; + ++lua_getglobal(L, "utf8"); + #if LUA_VERSION_NUM >= 502 +- luaL_newlib(L, libs); ++ luaL_setfuncs(L, libs, 0); #else - lua_createtable(L, 0, sizeof(libs)/sizeof(libs[0])); -- luaL_register(L, NULL, libs); -+ luaL_register(L, "utf8_ext", libs); +- lua_createtable(L, 0, sizeof(libs)/sizeof(libs[0])); + luaL_register(L, NULL, libs); #endif +#if 0 |