1 diff -Naur old/luapgsql.c new/luapgsql.c
2 --- luapgsql/luapgsql.c 2008-04-01 21:07:09.000000000 -0300
3 +++ luapgsql/luapgsql.c 2008-06-22 22:37:33.000000000 -0300
5 /* push a table onto the stack containing a row of data */
6 void lua_pushpgdata(lua_State *L, PGresult *rs, int row, int col) {
10 if (PQgetisnull(rs, row, col)) {
11 /* tasty NULLs - take that PHP! */
14 val = PQgetvalue(rs, row, col);
15 - switch (PQftype(rs, col)) {
17 - /* map postgresql default bool format */
18 - if (val[0] == 't') {
19 - lua_pushboolean(L, 1);
21 - lua_pushboolean(L, 0);
30 - /* convert using Lua string -> number conversion for reliability */
31 - lua_pushstring(L, val);
32 - temp = lua_tonumber(L, -1);
34 - lua_pushnumber(L, temp);
37 - /* it's all just a string after that */
38 - lua_pushstring(L, val);
41 + lua_pushstring(L, val);
45 diff -Naur old/Makefile new/Makefile
46 --- luapgsql/Makefile 2008-04-01 21:07:09.000000000 -0300
47 +++ luapgsql/Makefile 2008-06-22 22:22:51.000000000 -0300
49 # makefile for pgsql library for Lua
53 -LUAINC= $(LUA)/include/lua51
54 -LUALIB= $(LUA)/lib/lua51
56 -# these will probably work if Lua has been installed globally
58 -#LUAINC= $(LUA)/include
62 +LUAINC= $(LUA)/include
63 +LUALIB= $(LUA)/lib/lua
68 LPQINC= $(LPQ)/include
75 -#STATIC_OBJS= foobar.o
82 rm -f $(OBJS) $T core core.*
85 -# @echo "$(MYNAME) library:"
86 -# @fgrep '/**' $(MYLIB).c | cut -f2 -d/ | tr -d '*' | sort | column
93 TOTAR= Makefile,$(MYLIB).c,test.lua
97 -# tar zcvf $A -C .. $D/{$(TOTAR)}