about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-05 11:54:49 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-11-05 11:54:55 -0700
commitf2d61064fb675bd3cf2249ee71e76f19132b2b11 (patch)
tree891dcd39860e095ca0b27d21010395706798b251 /src
parentbf7baffa307bd30708f1cb59f8be9a9155887e93 (diff)
downloadteliva-f2d61064fb675bd3cf2249ee71e76f19132b2b11.tar.gz
copy metatable name from lcurses
Makes no difference to the results of:
  print(curses:stdscr())
Diffstat (limited to 'src')
-rw-r--r--src/lcurseslib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lcurseslib.c b/src/lcurseslib.c
index 52dc56f..683d418 100644
--- a/src/lcurseslib.c
+++ b/src/lcurseslib.c
@@ -30,7 +30,7 @@ static const struct luaL_Reg curseslib [] = {
 static void curses_newwin (lua_State *L, WINDOW *nw) {
   if (nw) {
     WINDOW **w = lua_newuserdata(L, sizeof(WINDOW*));
-    luaL_getmetatable(L, "meta.window");
+    luaL_getmetatable(L, "curses:window");
     lua_setmetatable(L, -2);
     *w = nw;
   }
@@ -42,7 +42,7 @@ static void curses_newwin (lua_State *L, WINDOW *nw) {
 
 
 static WINDOW **lc_getwin (lua_State *L, int offset) {
-	WINDOW **w = (WINDOW**)luaL_checkudata(L, offset, "meta.window");
+	WINDOW **w = (WINDOW**)luaL_checkudata(L, offset, "curses:window");
 	if (w == NULL)
 		luaL_argerror(L, offset, "bad curses window");
 	return w;
@@ -98,7 +98,7 @@ static const luaL_Reg curses_window_methods[] =
 
 
 LUALIB_API int luaopen_curses (lua_State *L) {
-  luaL_newmetatable(L, "meta.window");
+  luaL_newmetatable(L, "curses:window");
   luaL_register(L, NULL, curses_window_methods);
   luaL_register(L, "curses", curseslib);
   /* save main window on registry */