Merge pull request #9 from juanper/patch-1

Update src/ls_odbc.c
This commit is contained in:
blumf 2013-05-14 08:43:38 -07:00
commit 72e8c5b117

View File

@ -190,7 +190,7 @@ static int push_column(lua_State *L, int coltypes, const SQLHSTMT hstmt,
/* nUmber */ /* nUmber */
case 'u': { case 'u': {
double num; double num;
SQLINTEGER got; SQLLEN got;
SQLRETURN rc = SQLGetData(hstmt, i, SQL_C_DOUBLE, &num, 0, &got); SQLRETURN rc = SQLGetData(hstmt, i, SQL_C_DOUBLE, &num, 0, &got);
if (error(rc)) if (error(rc))
return fail(L, hSTMT, hstmt); return fail(L, hSTMT, hstmt);
@ -203,7 +203,7 @@ static int push_column(lua_State *L, int coltypes, const SQLHSTMT hstmt,
/* bOol */ /* bOol */
case 'o': { case 'o': {
char b; char b;
SQLINTEGER got; SQLLEN got;
SQLRETURN rc = SQLGetData(hstmt, i, SQL_C_BIT, &b, 0, &got); SQLRETURN rc = SQLGetData(hstmt, i, SQL_C_BIT, &b, 0, &got);
if (error(rc)) if (error(rc))
return fail(L, hSTMT, hstmt); return fail(L, hSTMT, hstmt);
@ -218,7 +218,7 @@ static int push_column(lua_State *L, int coltypes, const SQLHSTMT hstmt,
/* bInary */ /* bInary */
case 'i': { case 'i': {
SQLSMALLINT stype = (type == 't') ? SQL_C_CHAR : SQL_C_BINARY; SQLSMALLINT stype = (type == 't') ? SQL_C_CHAR : SQL_C_BINARY;
SQLINTEGER got; SQLLEN got;
char *buffer; char *buffer;
luaL_Buffer b; luaL_Buffer b;
SQLRETURN rc; SQLRETURN rc;