Piet Delport patches: 2 of 3.

This commit is contained in:
Federico Di Gregorio 2006-09-23 05:14:24 +00:00
parent 3009a29b11
commit 474d8b9d51
4 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,11 @@
2006-09-23 Federico Di Gregorio <fog@initd.org>
* Applied patch 2/3 from Piet Delport; from his email:
psycopg2-Py_ssize_t-output.diff adjusts variables used as outputs
from CPython API calls: without it the calls try to write 64 bits
to 32 bit locations, trampling over adjacent values/pointers,
and segfaulting later.
* Applied patch 1/3 from Piet Delport; from his email:
psycopg2-PyObject_HEAD.diff adds missing underscores to several
"PyObject_HEAD" declarations. As far as i can tell from gdb, the

View File

@ -134,7 +134,7 @@ binary_quote(binaryObject *self)
{
char *to;
const char *buffer;
int buffer_len;
Py_ssize_t buffer_len;
size_t len = 0;
/* if we got a plain string or a buffer we escape it and save the buffer */

View File

@ -92,7 +92,7 @@ qstring_quote(qstringObject *self)
{
PyObject *str;
char *s, *buffer;
int len;
Py_ssize_t len;
/* if the wrapped object is an unicode object we can encode it to match
self->encoding but if the encoding is not specified we don't know what

View File

@ -1090,7 +1090,7 @@ psyco_curs_copy_from(cursorObject *self, PyObject *args, PyObject *kwargs)
PyObject* collistiter = PyObject_GetIter(columns);
PyObject* col;
int collistlen = 2;
int colitemlen;
Py_ssize_t colitemlen;
char* colname;
if (collistiter == NULL) {
return NULL;