mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-11 03:26:37 +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>
|
||||
|
||||
* Reference count leak fix from David Rushby (copy_expert set 3/5.)
|
||||
|
||||
* 64 bit fix patch from David Rushby (copy_expert set 2/5.)
|
||||
|
||||
* 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")
|
||||
&& 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;
|
||||
return 1;
|
||||
}
|
||||
|
@ -1207,7 +1208,8 @@ static int
|
|||
_psyco_curs_has_write_check(PyObject* o, void* var)
|
||||
{
|
||||
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;
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user