fixed refcount error

use Py_RETURN_TRUE instead of return Py_True and Py_RETURN_FALSE instead of return Py_False.
Otherwise there will be refcount errors.
This commit is contained in:
Nico von Geyso
2012-11-15 19:32:25 +01:00
parent 36fb7215c7
commit c615ca29cd

View File

@@ -195,9 +195,9 @@ PyObject *
Repository_head_is_detached(Repository *self)
{
if(git_repository_head_detached(self->repo) > 0)
return Py_True;
Py_RETURN_TRUE;
return Py_False;
Py_RETURN_FALSE;
}
@@ -211,9 +211,9 @@ PyObject *
Repository_head_is_orphaned(Repository *self)
{
if(git_repository_head_orphan(self->repo) > 0)
return Py_True;
Py_RETURN_TRUE;
return Py_False;
Py_RETURN_FALSE;
}
@@ -226,9 +226,9 @@ PyObject *
Repository_is_empty(Repository *self)
{
if(git_repository_is_empty(self->repo) > 0)
return Py_True;
Py_RETURN_TRUE;
return Py_False;
Py_RETURN_FALSE;
}
@@ -241,9 +241,9 @@ PyObject *
Repository_is_bare(Repository *self)
{
if(git_repository_is_bare(self->repo) > 0)
return Py_True;
Py_RETURN_TRUE;
return Py_False;
Py_RETURN_FALSE;
}