Permalink
Browse files

SQLBIGINT is not big enough on 64bit platform.

  • Loading branch information...
1 parent 6ded8a8 commit 4dbd86505b25ec740a7a58cc722c069c9dcd8297 @yihuang yihuang committed with Mar 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/getdata.cpp
View
@@ -555,7 +555,7 @@ static PyObject* GetDataLongLong(Cursor* cur, Py_ssize_t iCol)
ColumnInfo* pinfo = &cur->colinfos[iCol];
SQLSMALLINT nCType = pinfo->is_unsigned ? SQL_C_UBIGINT : SQL_C_SBIGINT;
- SQLBIGINT value;
+ PY_LONG_LONG value;
SQLLEN cbFetched;
SQLRETURN ret;
@@ -570,7 +570,7 @@ static PyObject* GetDataLongLong(Cursor* cur, Py_ssize_t iCol)
Py_RETURN_NONE;
if (pinfo->is_unsigned)
- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)(SQLUBIGINT)value);
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)value);
return PyLong_FromLongLong((PY_LONG_LONG)value);
}

0 comments on commit 4dbd865

Please sign in to comment.