Fixed refcount bug (thank you, Purify and AMK).

This commit is contained in:
Guido van Rossum 1997-08-14 21:19:13 +00:00
parent 644c17d2af
commit f1c018de87
1 changed files with 1 additions and 0 deletions

View File

@ -700,6 +700,7 @@ reop__expand(self, args)
PyObject *r, *tuple, *result;
r=PyObject_GetAttrString(match_obj, "group");
tuple=PyTuple_New(1);
Py_INCREF(value);
PyTuple_SetItem(tuple, 0, value);
result=PyEval_CallObject(r, tuple);
Py_DECREF(r); Py_DECREF(tuple);