Some coding-style fixes, like not using tabs

This commit is contained in:
J. David Ibáñez
2014-02-12 22:11:10 +01:00
parent 9e6d33855c
commit 7fd633239f
2 changed files with 25 additions and 16 deletions

View File

@@ -67,23 +67,32 @@ TransferProgress_dealloc(TransferProgress *self)
}
PyMemberDef TransferProgress_members[] = {
RMEMBER(TransferProgress, total_objects, T_UINT, "Total number objects to download"),
RMEMBER(TransferProgress, indexed_objects, T_UINT, "Objects which have been indexed"),
RMEMBER(TransferProgress, received_objects, T_UINT, "Objects which have been received up to now"),
RMEMBER(TransferProgress, local_objects, T_UINT, "Local objects which were used to fix the thin pack"),
RMEMBER(TransferProgress, total_deltas, T_UINT, "Total number of deltas in the pack"),
RMEMBER(TransferProgress, indexed_deltas, T_UINT, "Deltas which have been indexed"),
/* FIXME: technically this is unsigned, but there's no value for size_t here. */
RMEMBER(TransferProgress, received_bytes, T_PYSSIZET, "Number of bytes received up to now"),
RMEMBER(TransferProgress, total_objects, T_UINT,
"Total number objects to download"),
RMEMBER(TransferProgress, indexed_objects, T_UINT,
"Objects which have been indexed"),
RMEMBER(TransferProgress, received_objects, T_UINT,
"Objects which have been received up to now"),
RMEMBER(TransferProgress, local_objects, T_UINT,
"Local objects which were used to fix the thin pack"),
RMEMBER(TransferProgress, total_deltas, T_UINT,
"Total number of deltas in the pack"),
RMEMBER(TransferProgress, indexed_deltas, T_UINT,
"Deltas which have been indexed"),
/* FIXME: technically this is unsigned, but there's no value for size_t
* here. */
RMEMBER(TransferProgress, received_bytes, T_PYSSIZET,
"Number of bytes received up to now"),
{NULL},
};
PyDoc_STRVAR(TransferProgress__doc__, "Progress downloading and indexing data during a fetch");
PyDoc_STRVAR(TransferProgress__doc__,
"Progress downloading and indexing data during a fetch");
PyTypeObject TransferProgressType = {
PyVarObject_HEAD_INIT(NULL, 0)
"_pygit2.TransferProgress", /* tp_name */
sizeof(TransferProgress), /* tp_basicsize */
sizeof(TransferProgress), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)TransferProgress_dealloc, /* tp_dealloc */
0, /* tp_print */
@@ -101,7 +110,7 @@ PyTypeObject TransferProgressType = {
0, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
TransferProgress__doc__, /* tp_doc */
TransferProgress__doc__, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
@@ -232,7 +241,7 @@ Remote_name__set__(Remote *self, PyObject* py_name)
name = py_str_borrow_c_str(&tname, py_name, NULL);
if (name != NULL) {
err = git_remote_rename(self->remote, name, NULL, NULL);
Py_DECREF(tname);
Py_DECREF(tname);
if (err == GIT_OK)
return 0;
@@ -412,7 +421,7 @@ Remote_url__set__(Remote *self, PyObject* py_url)
url = py_str_borrow_c_str(&turl, py_url, NULL);
if (url != NULL) {
err = git_remote_set_url(self->remote, url);
Py_DECREF(turl);
Py_DECREF(turl);
if (err == GIT_OK)
return 0;
@@ -449,7 +458,7 @@ Remote_push_url__set__(Remote *self, PyObject* py_url)
url = py_str_borrow_c_str(&turl, py_url, NULL);
if (url != NULL) {
err = git_remote_set_pushurl(self->remote, url);
Py_DECREF(turl);
Py_DECREF(turl);
if (err == GIT_OK)
return 0;

View File

@@ -333,7 +333,7 @@ Repository_revparse_single(Repository *self, PyObject *py_spec)
if (err < 0) {
PyObject *err_obj = Error_set_str(err, c_spec);
Py_DECREF(tspec);
Py_DECREF(tspec);
return err_obj;
}
Py_DECREF(tspec);
@@ -1051,7 +1051,7 @@ Repository_lookup_reference(Repository *self, PyObject *py_name)
err = git_reference_lookup(&c_reference, self->repo, c_name);
if (err < 0) {
PyObject *err_obj = Error_set_str(err, c_name);
free(c_name);
free(c_name);
return err_obj;
}
free(c_name);