mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 20:23:45 +03:00
Piet Delport patches: 2 of 3.
This commit is contained in:
parent
3009a29b11
commit
474d8b9d51
|
@ -1,5 +1,11 @@
|
||||||
2006-09-23 Federico Di Gregorio <fog@initd.org>
|
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:
|
* Applied patch 1/3 from Piet Delport; from his email:
|
||||||
psycopg2-PyObject_HEAD.diff adds missing underscores to several
|
psycopg2-PyObject_HEAD.diff adds missing underscores to several
|
||||||
"PyObject_HEAD" declarations. As far as i can tell from gdb, the
|
"PyObject_HEAD" declarations. As far as i can tell from gdb, the
|
||||||
|
|
|
@ -134,7 +134,7 @@ binary_quote(binaryObject *self)
|
||||||
{
|
{
|
||||||
char *to;
|
char *to;
|
||||||
const char *buffer;
|
const char *buffer;
|
||||||
int buffer_len;
|
Py_ssize_t buffer_len;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
|
|
||||||
/* if we got a plain string or a buffer we escape it and save the buffer */
|
/* 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;
|
PyObject *str;
|
||||||
char *s, *buffer;
|
char *s, *buffer;
|
||||||
int len;
|
Py_ssize_t len;
|
||||||
|
|
||||||
/* if the wrapped object is an unicode object we can encode it to match
|
/* 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
|
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* collistiter = PyObject_GetIter(columns);
|
||||||
PyObject* col;
|
PyObject* col;
|
||||||
int collistlen = 2;
|
int collistlen = 2;
|
||||||
int colitemlen;
|
Py_ssize_t colitemlen;
|
||||||
char* colname;
|
char* colname;
|
||||||
if (collistiter == NULL) {
|
if (collistiter == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user