Fix issue #39, add missing Py_INCREF

This commit is contained in:
J. David Ibáñez 2011-08-05 12:52:43 +02:00
parent 7545cdf9f3
commit 7f7a512e66

@ -425,6 +425,7 @@ Repository_get_index(Repository *self, void *closure)
py_index = (Index*)IndexType.tp_alloc(&IndexType, 0);
if (!py_index)
return PyErr_NoMemory();
Py_INCREF(self);
py_index->repo = self;
py_index->index = index;
py_index->own_obj = 0;