Patchset copy_expert 3/5.

This commit is contained in:
Federico Di Gregorio 2007-05-29 08:16:44 +00:00
parent 3b2908b51e
commit c54e9142f4
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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;
}