Issue#298: Fix compilation on Windows

This commit is contained in:
J. David Ibáñez
2013-12-10 13:41:51 +01:00
parent 749810ac77
commit b8e72fc272

View File

@@ -137,6 +137,7 @@ Branch_remote_name__get__(Branch *self)
int err; int err;
const char *branch_name; const char *branch_name;
char *c_name = NULL; char *c_name = NULL;
PyObject *py_name;
CHECK_REFERENCE(self); CHECK_REFERENCE(self);
@@ -160,7 +161,7 @@ Branch_remote_name__get__(Branch *self)
return Error_set(err); return Error_set(err);
} }
PyObject *py_name = to_unicode(c_name, NULL, NULL); py_name = to_unicode(c_name, NULL, NULL);
free(c_name); free(c_name);
return py_name; return py_name;
@@ -228,6 +229,7 @@ Branch_upstream_name__get__(Branch *self)
int err; int err;
const char *branch_name; const char *branch_name;
char *c_name = NULL; char *c_name = NULL;
PyObject *py_name;
CHECK_REFERENCE(self); CHECK_REFERENCE(self);
@@ -251,7 +253,7 @@ Branch_upstream_name__get__(Branch *self)
return Error_set(err); return Error_set(err);
} }
PyObject *py_name = to_unicode(c_name, NULL, NULL); py_name = to_unicode(c_name, NULL, NULL);
free(c_name); free(c_name);
return py_name; return py_name;