mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Piet Delport patches: 2 of 3.
This commit is contained in:
parent
3009a29b11
commit
474d8b9d51
|
@ -1,4 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user