mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Patchset copy_expert 3/5.
This commit is contained in:
parent
3b2908b51e
commit
c54e9142f4
|
@ -1,5 +1,7 @@
|
||||||
2007-05-29 Federico Di Gregorio <fog@initd.org>
|
2007-05-29 Federico Di Gregorio <fog@initd.org>
|
||||||
|
|
||||||
|
* Reference count leak fix from David Rushby (copy_expert set 3/5.)
|
||||||
|
|
||||||
* 64 bit fix patch from David Rushby (copy_expert set 2/5.)
|
* 64 bit fix patch from David Rushby (copy_expert set 2/5.)
|
||||||
|
|
||||||
* Applied whitespace normalization patch from David Rushby (copy_expert
|
* Applied whitespace normalization patch from David Rushby (copy_expert
|
||||||
|
|
|
@ -1135,7 +1135,8 @@ _psyco_curs_has_read_check(PyObject* o, void* var)
|
||||||
{
|
{
|
||||||
if (PyObject_HasAttrString(o, "readline")
|
if (PyObject_HasAttrString(o, "readline")
|
||||||
&& PyObject_HasAttrString(o, "read")) {
|
&& PyObject_HasAttrString(o, "read")) {
|
||||||
Py_INCREF(o);
|
/* It's OK to store a borrowed reference, because it is only held for
|
||||||
|
* the duration of psyco_curs_copy_from. */
|
||||||
*((PyObject**)var) = o;
|
*((PyObject**)var) = o;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1207,7 +1208,8 @@ static int
|
||||||
_psyco_curs_has_write_check(PyObject* o, void* var)
|
_psyco_curs_has_write_check(PyObject* o, void* var)
|
||||||
{
|
{
|
||||||
if (PyObject_HasAttrString(o, "write")) {
|
if (PyObject_HasAttrString(o, "write")) {
|
||||||
Py_INCREF(o);
|
/* It's OK to store a borrowed reference, because it is only held for
|
||||||
|
* the duration of psyco_curs_copy_to. */
|
||||||
*((PyObject**)var) = o;
|
*((PyObject**)var) = o;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user