gst: run gst-indent all C files

We hadn't done it since the switch to git... whoops
This commit is contained in:
Edward Hervey 2010-11-09 11:00:16 +01:00
parent ee647847f3
commit ab46967800
9 changed files with 505 additions and 499 deletions

View File

@ -63,4 +63,3 @@ pygst_caps_from_pyobject (PyObject *object, gboolean *copy)
PyErr_SetString (PyExc_TypeError, "could not convert to GstCaps"); PyErr_SetString (PyExc_TypeError, "could not convert to GstCaps");
return NULL; return NULL;
} }

View File

@ -60,7 +60,8 @@ exception:
} }
static int static int
add_method(PyObject *klass, PyObject *dict, PyMethodDef *method) { add_method (PyObject * klass, PyObject * dict, PyMethodDef * method)
{
PyObject *module = NULL; PyObject *module = NULL;
PyObject *func = NULL; PyObject *func = NULL;
PyObject *meth = NULL; PyObject *meth = NULL;
@ -211,7 +212,7 @@ pygst_exceptions_register_classes(PyObject *d)
if (dict == NULL) if (dict == NULL)
goto exception; goto exception;
PyGstExc_PluginNotFoundError = \ PyGstExc_PluginNotFoundError =
PyErr_NewException ("gst.PluginNotFoundError", PyExc_Exception, dict); PyErr_NewException ("gst.PluginNotFoundError", PyExc_Exception, dict);
if (PyGstExc_PluginNotFoundError == NULL) if (PyGstExc_PluginNotFoundError == NULL)
goto exception; goto exception;
@ -233,8 +234,9 @@ pygst_exceptions_register_classes(PyObject *d)
if (dict == NULL) if (dict == NULL)
goto exception; goto exception;
PyGstExc_ElementNotFoundError = \ PyGstExc_ElementNotFoundError =
PyErr_NewException("gst.ElementNotFoundError", PyGstExc_PluginNotFoundError, dict); PyErr_NewException ("gst.ElementNotFoundError",
PyGstExc_PluginNotFoundError, dict);
if (PyGstExc_ElementNotFoundError == NULL) if (PyGstExc_ElementNotFoundError == NULL)
goto exception; goto exception;

View File

@ -79,14 +79,14 @@ pygstminiobject_lookup_class(GType gtype)
*/ */
void void
pygstminiobject_register_class (PyObject * dict, const gchar * type_name, pygstminiobject_register_class (PyObject * dict, const gchar * type_name,
GType gtype, PyTypeObject *type, GType gtype, PyTypeObject * type, PyObject * bases)
PyObject *bases)
{ {
PyObject *o; PyObject *o;
const char *class_name, *s; const char *class_name, *s;
if (!pygstminiobject_class_key) if (!pygstminiobject_class_key)
pygstminiobject_class_key = g_quark_from_static_string(pygstminiobject_class_id); pygstminiobject_class_key =
g_quark_from_static_string (pygstminiobject_class_id);
class_name = type->tp_name; class_name = type->tp_name;
s = strrchr (class_name, '.'); s = strrchr (class_name, '.');
@ -204,8 +204,10 @@ pygstminiobject_dealloc(PyGstMiniObject *self)
static int static int
pygstminiobject_compare (PyGstMiniObject * self, PyGstMiniObject * v) pygstminiobject_compare (PyGstMiniObject * self, PyGstMiniObject * v)
{ {
if (self->obj == v->obj) return 0; if (self->obj == v->obj)
if (self->obj > v->obj) return -1; return 0;
if (self->obj > v->obj)
return -1;
return 1; return 1;
} }
@ -239,7 +241,8 @@ pygstminiobject_free(PyObject *op)
/* ---------------- PyGstMiniObject methods ----------------- */ /* ---------------- PyGstMiniObject methods ----------------- */
static int static int
pygstminiobject_init(PyGstMiniObject *self, PyObject *args, PyObject *kwargs) pygstminiobject_init (PyGstMiniObject * self, PyObject * args,
PyObject * kwargs)
{ {
GType object_type; GType object_type;
GstMiniObjectClass *class; GstMiniObjectClass *class;
@ -273,7 +276,8 @@ pygstminiobject_init(PyGstMiniObject *self, PyObject *args, PyObject *kwargs)
} }
static PyObject * static PyObject *
pygstminiobject__gstminiobject_init__(PyGstMiniObject *self, PyObject *args, PyObject *kwargs) pygstminiobject__gstminiobject_init__ (PyGstMiniObject * self, PyObject * args,
PyObject * kwargs)
{ {
if (pygstminiobject_init (self, args, kwargs) < 0) if (pygstminiobject_init (self, args, kwargs) < 0)
return NULL; return NULL;
@ -288,9 +292,11 @@ pygstminiobject_copy(PyGstMiniObject *self, PyObject *args)
} }
static PyMethodDef pygstminiobject_methods[] = { static PyMethodDef pygstminiobject_methods[] = {
{ "__gstminiobject_init__", (PyCFunction)pygstminiobject__gstminiobject_init__, {"__gstminiobject_init__",
(PyCFunction) pygstminiobject__gstminiobject_init__,
METH_VARARGS | METH_KEYWORDS}, METH_VARARGS | METH_KEYWORDS},
{ "copy", (PyCFunction)pygstminiobject_copy, METH_VARARGS, "Copies the miniobject"}, {"copy", (PyCFunction) pygstminiobject_copy, METH_VARARGS,
"Copies the miniobject"},
{NULL, NULL, 0} {NULL, NULL, 0}
}; };
@ -370,4 +376,3 @@ PyTypeObject PyGstMiniObject_Type = {
(inquiry) 0, /* tp_is_gc */ (inquiry) 0, /* tp_is_gc */
(PyObject *) 0, /* tp_bases */ (PyObject *) 0, /* tp_bases */
}; };