blob: 72a0984048d2a7ac16ca09f8b68faad163eb112f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
--- lutf8lib.c 2015-01-12 18:46:22.334838510 -0500
+++ lib/lutf8lib.c 2015-01-12 22:42:54.527406794 -0500
@@ -246,8 +246,9 @@
};
-LUAMOD_API int luaopen_utf8 (lua_State *L) {
- luaL_newlib(L, funcs);
+int luaopen_utf8 (lua_State *L) {
+ lua_newtable(L), luaL_register(L, NULL, funcs);
+ lua_pushvalue(L, -1), lua_setglobal(L, "utf8");
lua_pushliteral(L, UTF8PATT);
lua_setfield(L, -2, "charpattern");
return 1;
|