SOURCES: python-pyodbc-py25.patch (NEW) - fix building with python...
wiget
wiget at pld-linux.org
Thu Nov 2 17:36:11 CET 2006
Author: wiget Date: Thu Nov 2 16:36:11 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fix building with python 2.5
---- Files affected:
SOURCES:
python-pyodbc-py25.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/python-pyodbc-py25.patch
diff -u /dev/null SOURCES/python-pyodbc-py25.patch:1.1
--- /dev/null Thu Nov 2 17:36:11 2006
+++ SOURCES/python-pyodbc-py25.patch Thu Nov 2 17:36:06 2006
@@ -0,0 +1,49 @@
+--- pyodbc-2.0.30/cursor.cpp.wiget 2006-11-02 16:52:19.000000000 +0100
++++ pyodbc-2.0.30/cursor.cpp 2006-11-02 17:06:36.000000000 +0100
+@@ -671,7 +671,7 @@
+ SQLINTEGER bufsize = 0;
+
+ const char* pb;
+- int cb;
++ Py_ssize_t cb;
+
+ // If you don't want to use pcbData, set it to zero. (Not its value -- the pointer.)
+ SQLINTEGER* pcbData = (SQLINTEGER*)&pbParams[*pibNext];
+@@ -1003,7 +1003,7 @@
+
+ int params_offset = skip_first ? 1 : 0;
+ Py_ssize_t cParams = params == 0 ? 0 : PySequence_Length(params) - params_offset;
+- size_t cb = 0;
++ Py_ssize_t cb = 0;
+
+ // If parameters are provided and we need to convert them to a different format for ODBC, memory will be allocated
+ // here (using malloc).
+@@ -1097,7 +1097,7 @@
+
+ BufferSegmentIterator it(pBuffer);
+ byte* pb;
+- int cb;
++ Py_ssize_t cb;
+ while (it.Next(pb, cb))
+ SQLPutData(cur->hstmt, pb, cb);
+ }
+@@ -1813,7 +1813,7 @@
+ // exception is set and zero is returned. (To differentiate between the last two, use PyErr_Occurred.)
+
+ SQLRETURN ret = 0;
+- int field_count, i;
++ Py_ssize_t field_count, i;
+ PyObject** apValues;
+
+ Py_BEGIN_ALLOW_THREADS
+--- pyodbc-2.0.30/row.h.wiget 2006-11-02 17:08:31.000000000 +0100
++++ pyodbc-2.0.30/row.h 2006-11-02 17:08:45.000000000 +0100
+@@ -19,7 +19,7 @@
+ /*
+ * Used to make a new row from an array of column values.
+ */
+-Row* Row_New(PyObject* map_name_to_index, int cValues, PyObject** apValues);
++Row* Row_New(PyObject* map_name_to_index, Py_ssize_t cValues, PyObject** apValues);
+
+ /*
+ * Dereferences each object in apValues and frees apValue. This is the internal format used by rows.
================================================================
More information about the pld-cvs-commit
mailing list