summaryrefslogtreecommitdiff
path: root/lib/lua/sqlite
diff options
context:
space:
mode:
authorlneto <lneto@NetBSD.org>2014-07-19 18:38:33 +0000
committerlneto <lneto@NetBSD.org>2014-07-19 18:38:33 +0000
commitc4b1eb35e827c43a0dcf41027c98aaedf46be036 (patch)
treef80015954e9c51266af4f2e1c57f2134cbcc1d62 /lib/lua/sqlite
parentc6d74635a1d93d95a3770bd621dcd83ed33100c2 (diff)
lua: updated from 5.1 to 5.3 work3
* lua(1): - changed lua_Integer to intmax_t - updated distrib/sets/lists and etc/mtree - updated bsd.lua.mk - fixed bozohttpd (lua-bozo.c) - compatibilized bindings: gpio, sqlite * lua(4): - removed floating-point and libc dependencies using '#ifndef _KERNEL' - fixed division by zero and exponentiation - libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct() - acpica: removed isprint() from acnetbsd.h - libc: moved strcspn.c, strpbrk.c and strspn.c to common - removed stub headers - compatibilized bindings: luapmf, luasystm * reorganized luaconf.h * updated doc/CHANGES and doc/RESPONSIBLE
Diffstat (limited to 'lib/lua/sqlite')
-rw-r--r--lib/lua/sqlite/sqlite.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/lua/sqlite/sqlite.c b/lib/lua/sqlite/sqlite.c
index fe33a13d268..e3bc14e78f8 100644
--- a/lib/lua/sqlite/sqlite.c
+++ b/lib/lua/sqlite/sqlite.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sqlite.c,v 1.6 2013/10/27 12:38:08 mbalmer Exp $ */
+/* $NetBSD: sqlite.c,v 1.7 2014/07/19 18:38:34 lneto Exp $ */
/*
* Copyright (c) 2011, 2013 Marc Balmer <marc@msys.ch>
@@ -446,14 +446,14 @@ luaopen_sqlite(lua_State* L)
sqlite3_initialize();
- luaL_register(L, "sqlite", sqlite_methods);
- luaL_register(L, NULL, db_methods);
- luaL_register(L, NULL, stmt_methods);
+ luaL_newlib(L, sqlite_methods);
+ luaL_setfuncs(L, db_methods, 0);
+ luaL_setfuncs(L, stmt_methods, 0);
gpio_set_info(L);
/* The database connection metatable */
if (luaL_newmetatable(L, SQLITE_DB_METATABLE)) {
- luaL_register(L, NULL, db_methods);
+ luaL_setfuncs(L, db_methods, 0);
lua_pushliteral(L, "__gc");
lua_pushcfunction(L, db_close);
@@ -471,7 +471,7 @@ luaopen_sqlite(lua_State* L)
/* The statement metatable */
if (luaL_newmetatable(L, SQLITE_STMT_METATABLE)) {
- luaL_register(L, NULL, stmt_methods);
+ luaL_setfuncs(L, stmt_methods, 0);
lua_pushliteral(L, "__gc");
lua_pushcfunction(L, stmt_finalize);