[pybank] Delete tabs and trailing whitespace. Reindent
- From: Johan Dahlin <johan src gnome org>
- To: svn-commits-list gnome org
- Subject: [pybank] Delete tabs and trailing whitespace. Reindent
- Date: Tue, 2 Jun 2009 10:47:29 -0400 (EDT)
commit 1848efb3884b58a35931d13b22393a61c8302363
Author: Johan Dahlin <johan gnome org>
Date: Tue Jun 2 11:42:59 2009 -0300
Delete tabs and trailing whitespace. Reindent
---
bank/bank-argument.c | 141 +++++++++++++-------------
bank/bank-info.c | 273 +++++++++++++++++++++++++-------------------------
bank/bank.c | 45 ++++----
3 files changed, 231 insertions(+), 228 deletions(-)
diff --git a/bank/bank-argument.c b/bank/bank-argument.c
index 426aaef..7c572c5 100644
--- a/bank/bank-argument.c
+++ b/bank/bank-argument.c
@@ -28,44 +28,44 @@ pyg_argument_from_pyobject(PyObject *object, GITypeInfo *type_info)
GITypeTag type_tag;
GIBaseInfo* interface_info;
GIInfoType interface_type;
-
+
type_tag = g_type_info_get_tag((GITypeInfo*)type_info);
switch (type_tag) {
case GI_TYPE_TAG_VOID:
- /* Nothing to do */
- break;
+ /* Nothing to do */
+ break;
case GI_TYPE_TAG_UTF8:
- if (object == Py_None)
- arg.v_pointer = NULL;
- else
- arg.v_pointer = PyString_AsString(object);
- break;
+ if (object == Py_None)
+ arg.v_pointer = NULL;
+ else
+ arg.v_pointer = PyString_AsString(object);
+ break;
case GI_TYPE_TAG_UINT8:
- arg.v_uint8 = PyInt_AsLong(object);
- break;
+ arg.v_uint8 = PyInt_AsLong(object);
+ break;
case GI_TYPE_TAG_UINT:
arg.v_uint = PyInt_AsLong(object);
break;
case GI_TYPE_TAG_UINT16:
- arg.v_uint16 = PyInt_AsLong(object);
- break;
+ arg.v_uint16 = PyInt_AsLong(object);
+ break;
case GI_TYPE_TAG_UINT32:
- arg.v_uint32 = PyLong_AsLongLong(object);
- break;
+ arg.v_uint32 = PyLong_AsLongLong(object);
+ break;
case GI_TYPE_TAG_UINT64:
- if (PyInt_Check(object)) {
- PyObject *long_obj = PyNumber_Long(object);
- arg.v_uint64 = PyLong_AsUnsignedLongLong(long_obj);
- Py_DECREF(long_obj);
- } else
- arg.v_uint64 = PyLong_AsUnsignedLongLong(object);
- break;
+ if (PyInt_Check(object)) {
+ PyObject *long_obj = PyNumber_Long(object);
+ arg.v_uint64 = PyLong_AsUnsignedLongLong(long_obj);
+ Py_DECREF(long_obj);
+ } else
+ arg.v_uint64 = PyLong_AsUnsignedLongLong(object);
+ break;
case GI_TYPE_TAG_INT8:
arg.v_int8 = PyInt_AsLong(object);
break;
case GI_TYPE_TAG_INT:
- arg.v_int = PyInt_AsLong(object);
- break;
+ arg.v_int = PyInt_AsLong(object);
+ break;
case GI_TYPE_TAG_LONG:
arg.v_long = PyInt_AsLong(object);
break;
@@ -76,20 +76,20 @@ pyg_argument_from_pyobject(PyObject *object, GITypeInfo *type_info)
arg.v_boolean = PyInt_AsLong(object);
break;
case GI_TYPE_TAG_INT16:
- arg.v_int16 = PyInt_AsLong(object);
- break;
+ arg.v_int16 = PyInt_AsLong(object);
+ break;
case GI_TYPE_TAG_INT32:
- arg.v_int32 = PyInt_AsLong(object);
- break;
+ arg.v_int32 = PyInt_AsLong(object);
+ break;
case GI_TYPE_TAG_INT64:
- arg.v_int64 = PyLong_AsLongLong(object);
- break;
+ arg.v_int64 = PyLong_AsLongLong(object);
+ break;
case GI_TYPE_TAG_FLOAT:
- arg.v_float = (float)PyFloat_AsDouble(object);
- break;
+ arg.v_float = (float)PyFloat_AsDouble(object);
+ break;
case GI_TYPE_TAG_DOUBLE:
- arg.v_double = PyFloat_AsDouble(object);
- break;
+ arg.v_double = PyFloat_AsDouble(object);
+ break;
case GI_TYPE_TAG_INTERFACE:
interface_info = g_type_info_get_interface(type_info);
interface_type = g_base_info_get_type(interface_info);
@@ -101,8 +101,8 @@ pyg_argument_from_pyobject(PyObject *object, GITypeInfo *type_info)
arg.v_pointer = pygobject_get(object);
break;
case GI_TYPE_TAG_ARRAY:
- arg.v_pointer = NULL;
- break;
+ arg.v_pointer = NULL;
+ break;
case GI_TYPE_TAG_ERROR:
/* Allow NULL GError, otherwise fall through */
if (object == Py_None) {
@@ -110,11 +110,11 @@ pyg_argument_from_pyobject(PyObject *object, GITypeInfo *type_info)
break;
}
default:
- g_print("<PyO->GArg> GITypeTag %s is unhandled\n",
- g_type_tag_to_string(type_tag));
- break;
+ g_print("<PyO->GArg> GITypeTag %s is unhandled\n",
+ g_type_tag_to_string(type_tag));
+ break;
}
-
+
return arg;
}
@@ -243,26 +243,26 @@ pyg_argument_to_pyobject(GArgument *arg, GITypeInfo *type_info)
type_tag == GI_TYPE_TAG_GSLIST ? arg->v_pointer : NULL);
break;
case GI_TYPE_TAG_BOOLEAN:
- obj = PyBool_FromLong(arg->v_boolean);
- break;
+ obj = PyBool_FromLong(arg->v_boolean);
+ break;
case GI_TYPE_TAG_UINT8:
- obj = PyInt_FromLong(arg->v_uint8);
- break;
+ obj = PyInt_FromLong(arg->v_uint8);
+ break;
case GI_TYPE_TAG_UINT:
obj = PyInt_FromLong(arg->v_uint);
break;
case GI_TYPE_TAG_UINT16:
- obj = PyInt_FromLong(arg->v_uint16);
- break;
+ obj = PyInt_FromLong(arg->v_uint16);
+ break;
case GI_TYPE_TAG_UINT32:
- obj = PyLong_FromLongLong(arg->v_uint32);
- break;
+ obj = PyLong_FromLongLong(arg->v_uint32);
+ break;
case GI_TYPE_TAG_UINT64:
- obj = PyLong_FromUnsignedLongLong(arg->v_uint64);
- break;
+ obj = PyLong_FromUnsignedLongLong(arg->v_uint64);
+ break;
case GI_TYPE_TAG_INT:
- obj = PyInt_FromLong(arg->v_int);
- break;
+ obj = PyInt_FromLong(arg->v_int);
+ break;
case GI_TYPE_TAG_LONG:
obj = PyInt_FromLong(arg->v_long);
break;
@@ -270,29 +270,29 @@ pyg_argument_to_pyobject(GArgument *arg, GITypeInfo *type_info)
obj = PyInt_FromLong(arg->v_ulong);
break;
case GI_TYPE_TAG_INT8:
- obj = PyInt_FromLong(arg->v_int8);
- break;
+ obj = PyInt_FromLong(arg->v_int8);
+ break;
case GI_TYPE_TAG_INT16:
- obj = PyInt_FromLong(arg->v_int16);
- break;
+ obj = PyInt_FromLong(arg->v_int16);
+ break;
case GI_TYPE_TAG_INT32:
- obj = PyInt_FromLong(arg->v_int32);
- break;
+ obj = PyInt_FromLong(arg->v_int32);
+ break;
case GI_TYPE_TAG_INT64:
- obj = PyLong_FromLongLong(arg->v_int64);
- break;
+ obj = PyLong_FromLongLong(arg->v_int64);
+ break;
case GI_TYPE_TAG_FLOAT:
- obj = PyFloat_FromDouble(arg->v_float);
- break;
+ obj = PyFloat_FromDouble(arg->v_float);
+ break;
case GI_TYPE_TAG_DOUBLE:
- obj = PyFloat_FromDouble(arg->v_double);
- break;
+ obj = PyFloat_FromDouble(arg->v_double);
+ break;
case GI_TYPE_TAG_UTF8:
if (arg->v_string == NULL)
- obj = Py_None;
- else
+ obj = Py_None;
+ else
obj = PyString_FromString(arg->v_string);
- break;
+ break;
case GI_TYPE_TAG_INTERFACE:
interface_info = g_type_info_get_interface(type_info);
interface_type = g_base_info_get_type(interface_info);
@@ -365,10 +365,10 @@ pyg_argument_to_pyobject(GArgument *arg, GITypeInfo *type_info)
obj = Py_None;
break;
default:
- g_print("<GArg->PyO> GITypeTag %s is unhandled\n",
- g_type_tag_to_string(type_tag));
- obj = PyString_FromString("<unhandled return value!>"); /* */
- break;
+ g_print("<GArg->PyO> GITypeTag %s is unhandled\n",
+ g_type_tag_to_string(type_tag));
+ obj = PyString_FromString("<unhandled return value!>"); /* */
+ break;
}
if (obj != NULL)
@@ -377,3 +377,4 @@ pyg_argument_to_pyobject(GArgument *arg, GITypeInfo *type_info)
return obj;
}
+
diff --git a/bank/bank-info.c b/bank/bank-info.c
index c1a294f..8866824 100644
--- a/bank/bank-info.c
+++ b/bank/bank-info.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 sw=4 noet ai cindent :
- *
+ *
* Copyright (C) 2005 Johan Dahlin <johan gnome org>
*
* This library is free software; you can redistribute it and/or
@@ -25,8 +25,8 @@ static void pyg_base_info_dealloc(PyGIBaseInfo *self);
static void pyg_base_info_free(PyObject *op);
static PyObject* pyg_base_info_repr(PyGIBaseInfo *self);
static int pyg_base_info_traverse(PyGIBaseInfo *self,
- visitproc visit,
- void *arg);
+ visitproc visit,
+ void *arg);
static void pyg_base_info_clear(PyGIBaseInfo *self);
static PyObject *
@@ -36,17 +36,17 @@ _wrap_g_object_info_get_methods(PyGIBaseInfo *self);
static PyMethodDef _Py##cname##_methods[]; \
PyTypeObject Py##cname##_Type = { \
PyObject_HEAD_INIT(NULL) \
- 0, \
+ 0, \
"bank." name, \
- sizeof(PyGIBaseInfo), \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
- 0, 0, 0, 0, 0, 0, \
+ sizeof(PyGIBaseInfo), \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, \
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, \
- NULL, 0, 0, 0, \
+ NULL, 0, 0, 0, \
offsetof(PyGIBaseInfo, weakreflist), \
0, 0, \
_Py##cname##_methods, \
- 0, 0, NULL, NULL, 0, 0, \
+ 0, 0, NULL, NULL, 0, 0, \
offsetof(PyGIBaseInfo, instance_dict) \
}
@@ -55,49 +55,49 @@ static PyGetSetDef _PyGIBaseInfo_getsets[];
PyTypeObject PyGIBaseInfo_Type = {
PyObject_HEAD_INIT(NULL)
- 0,
- "bank.BaseInfo",
- sizeof(PyGIBaseInfo),
- 0,
+ 0,
+ "bank.BaseInfo",
+ sizeof(PyGIBaseInfo),
+ 0,
/* methods */
- (destructor)pyg_base_info_dealloc,
- (printfunc)0,
- (getattrfunc)0,
- (setattrfunc)0,
+ (destructor)pyg_base_info_dealloc,
+ (printfunc)0,
+ (getattrfunc)0,
+ (setattrfunc)0,
(cmpfunc)0,
- (reprfunc)pyg_base_info_repr,
- 0,
- 0,
- 0,
- (hashfunc)0,
- (ternaryfunc)0,
- (reprfunc)0,
- (getattrofunc)0,
- (setattrofunc)0,
- 0,
+ (reprfunc)pyg_base_info_repr,
+ 0,
+ 0,
+ 0,
+ (hashfunc)0,
+ (ternaryfunc)0,
+ (reprfunc)0,
+ (getattrofunc)0,
+ (setattrofunc)0,
+ 0,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
Py_TPFLAGS_HAVE_GC,
NULL,
- (traverseproc)pyg_base_info_traverse,
+ (traverseproc)pyg_base_info_traverse,
(inquiry)pyg_base_info_clear,
- (richcmpfunc)0,
+ (richcmpfunc)0,
offsetof(PyGIBaseInfo, weakreflist),
(getiterfunc)0,
(iternextfunc)0,
_PyGIBaseInfo_methods,
- 0,
- _PyGIBaseInfo_getsets,
- NULL,
- NULL,
- (descrgetfunc)0,
- (descrsetfunc)0,
- offsetof(PyGIBaseInfo, instance_dict),
+ 0,
+ _PyGIBaseInfo_getsets,
+ NULL,
+ NULL,
+ (descrgetfunc)0,
+ (descrsetfunc)0,
+ offsetof(PyGIBaseInfo, instance_dict),
(initproc)0,
- (allocfunc)0, /* tp_alloc */
- (newfunc)0, /* tp_new */
- (freefunc)pyg_base_info_free, /* tp_free */
- (inquiry)0, /* tp_is_gc */
- (PyObject *)0, /* tp_bases */
+ (allocfunc)0, /* tp_alloc */
+ (newfunc)0, /* tp_new */
+ (freefunc)pyg_base_info_free, /* tp_free */
+ (inquiry)0, /* tp_is_gc */
+ (PyObject *)0, /* tp_bases */
};
static PyObject *
@@ -106,9 +106,9 @@ pyg_base_info_repr(PyGIBaseInfo *self)
gchar buf[256];
g_snprintf(buf, sizeof(buf),
- "<%s object (%s) at 0x%lx>",
- self->ob_type->tp_name,
- g_base_info_get_name(self->info), (long)self);
+ "<%s object (%s) at 0x%lx>",
+ self->ob_type->tp_name,
+ g_base_info_get_name(self->info), (long)self);
return PyString_FromString(buf);
}
@@ -121,19 +121,19 @@ pyg_base_info_dealloc(PyGIBaseInfo *self)
static int
pyg_base_info_traverse(PyGIBaseInfo *self,
- visitproc visit,
- void *arg)
+ visitproc visit,
+ void *arg)
{
int ret = 0;
if (self->instance_dict)
- ret = visit(self->instance_dict, arg);
-
+ ret = visit(self->instance_dict, arg);
+
if (ret != 0)
- return ret;
+ return ret;
return 0;
-
+
}
static void
@@ -144,8 +144,8 @@ pyg_base_info_clear(PyGIBaseInfo *self)
Py_CLEAR(self->instance_dict);
if (self->info) {
- g_base_info_unref(self->info);
- self->info = NULL;
+ g_base_info_unref(self->info);
+ self->info = NULL;
}
PyObject_GC_Del(self);
@@ -162,9 +162,9 @@ static PyObject *
pyg_base_info_get_dict(PyGIBaseInfo *self, void *closure)
{
if (self->instance_dict == NULL) {
- self->instance_dict = PyDict_New();
- if (self->instance_dict == NULL)
- return NULL;
+ self->instance_dict = PyDict_New();
+ if (self->instance_dict == NULL)
+ return NULL;
}
Py_INCREF(self->instance_dict);
return self->instance_dict;
@@ -201,66 +201,66 @@ pyg_info_new(void *info)
PyTypeObject *tp;
if (info == NULL) {
- PyErr_SetString(PyExc_TypeError, "NULL value sent to pyg_info_new");
- return NULL;
+ PyErr_SetString(PyExc_TypeError, "NULL value sent to pyg_info_new");
+ return NULL;
}
-
+
type_info = g_base_info_get_type((GIBaseInfo*)info);
-
+
switch (type_info)
- {
- case GI_INFO_TYPE_OBJECT:
- tp = &PyGIObjectInfo_Type;
- break;
- case GI_INFO_TYPE_BOXED:
- tp = &PyGIBoxedInfo_Type;
- break;
- case GI_INFO_TYPE_STRUCT:
- tp = &PyGIStructInfo_Type;
- break;
- case GI_INFO_TYPE_FUNCTION:
- tp = &PyGIFunctionInfo_Type;
- break;
- case GI_INFO_TYPE_ENUM:
- case GI_INFO_TYPE_FLAGS:
- tp = &PyGIEnumInfo_Type;
- break;
- case GI_INFO_TYPE_ARG:
- tp = &PyGIArgInfo_Type;
- break;
- case GI_INFO_TYPE_TYPE:
- tp = &PyGITypeInfo_Type;
- break;
- case GI_INFO_TYPE_INTERFACE:
- tp = &PyGIInterfaceInfo_Type;
- break;
- case GI_INFO_TYPE_UNRESOLVED:
- tp = &PyGIUnresolvedInfo_Type;
- break;
- case GI_INFO_TYPE_VALUE:
- tp = &PyGIValueInfo_Type;
- break;
- case GI_INFO_TYPE_FIELD:
- tp = &PyGIFieldInfo_Type;
- break;
- default:
- g_print ("Unhandled GIInfoType: %d\n", type_info);
- Py_INCREF(Py_None);
- return Py_None;
- }
-
+ {
+ case GI_INFO_TYPE_OBJECT:
+ tp = &PyGIObjectInfo_Type;
+ break;
+ case GI_INFO_TYPE_BOXED:
+ tp = &PyGIBoxedInfo_Type;
+ break;
+ case GI_INFO_TYPE_STRUCT:
+ tp = &PyGIStructInfo_Type;
+ break;
+ case GI_INFO_TYPE_FUNCTION:
+ tp = &PyGIFunctionInfo_Type;
+ break;
+ case GI_INFO_TYPE_ENUM:
+ case GI_INFO_TYPE_FLAGS:
+ tp = &PyGIEnumInfo_Type;
+ break;
+ case GI_INFO_TYPE_ARG:
+ tp = &PyGIArgInfo_Type;
+ break;
+ case GI_INFO_TYPE_TYPE:
+ tp = &PyGITypeInfo_Type;
+ break;
+ case GI_INFO_TYPE_INTERFACE:
+ tp = &PyGIInterfaceInfo_Type;
+ break;
+ case GI_INFO_TYPE_UNRESOLVED:
+ tp = &PyGIUnresolvedInfo_Type;
+ break;
+ case GI_INFO_TYPE_VALUE:
+ tp = &PyGIValueInfo_Type;
+ break;
+ case GI_INFO_TYPE_FIELD:
+ tp = &PyGIFieldInfo_Type;
+ break;
+ default:
+ g_print ("Unhandled GIInfoType: %d\n", type_info);
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
if (tp->tp_flags & Py_TPFLAGS_HEAPTYPE)
- Py_INCREF(tp);
-
+ Py_INCREF(tp);
+
self = (PyGIBaseInfo*)PyObject_GC_New(PyGIBaseInfo, tp);
if (self == NULL)
- return NULL;
+ return NULL;
self->info = g_base_info_ref(info);
-
+
self->instance_dict = NULL;
self->weakreflist = NULL;
-
+
PyObject_GC_Track((PyObject *)self);
return (PyObject*)self;
@@ -288,9 +288,9 @@ _wrap_g_callable_info_get_args(PyGIBaseInfo *self)
for (i = 0; i < length; i++) {
GIArgInfo *arg;
- arg = g_callable_info_get_arg((GICallableInfo*)self->info, i);
- PyTuple_SetItem(retval, i, pyg_info_new(arg));
- g_base_info_unref((GIBaseInfo*)arg);
+ arg = g_callable_info_get_arg((GICallableInfo*)self->info, i);
+ PyTuple_SetItem(retval, i, pyg_info_new(arg));
+ g_base_info_unref((GIBaseInfo*)arg);
}
return retval;
@@ -315,14 +315,14 @@ static PyObject *
_wrap_g_function_info_is_constructor(PyGIBaseInfo *self)
{
return PyInt_FromLong(g_function_info_get_flags((GIFunctionInfo*)self->info) &
- GI_FUNCTION_IS_CONSTRUCTOR);
+ GI_FUNCTION_IS_CONSTRUCTOR);
}
static PyObject *
_wrap_g_function_info_is_method(PyGIBaseInfo *self)
{
return PyInt_FromLong(g_function_info_get_flags((GIFunctionInfo*)self->info) &
- GI_FUNCTION_IS_METHOD);
+ GI_FUNCTION_IS_METHOD);
}
static PyObject *
@@ -674,7 +674,7 @@ static PyObject *
_wrap_g_registered_type_info_get_g_type (PyGIBaseInfo* self)
{
int gtype;
-
+
gtype = g_registered_type_info_get_g_type ((GIRegisteredTypeInfo*)self->info);
return PyInt_FromLong(gtype);
}
@@ -699,9 +699,9 @@ _wrap_g_struct_info_get_fields(PyGIBaseInfo *self)
for (i = 0; i < length; i++) {
GIFieldInfo *field;
- field = g_struct_info_get_field((GIStructInfo*)self->info, i);
- PyTuple_SetItem(retval, i, pyg_info_new(field));
- g_base_info_unref((GIBaseInfo*)field);
+ field = g_struct_info_get_field((GIStructInfo*)self->info, i);
+ PyTuple_SetItem(retval, i, pyg_info_new(field));
+ g_base_info_unref((GIBaseInfo*)field);
}
g_base_info_unref(self->info);
@@ -720,12 +720,12 @@ _wrap_g_struct_info_get_methods(PyGIBaseInfo *self)
for (i = 0; i < length; i++) {
GIFunctionInfo *function;
- function = g_struct_info_get_method((GIStructInfo*)self->info, i);
- PyTuple_SetItem(retval, i, pyg_info_new(function));
- g_base_info_unref((GIBaseInfo*)function);
+ function = g_struct_info_get_method((GIStructInfo*)self->info, i);
+ PyTuple_SetItem(retval, i, pyg_info_new(function));
+ g_base_info_unref((GIBaseInfo*)function);
}
g_base_info_unref(self->info);
-
+
return retval;
}
@@ -761,18 +761,18 @@ _wrap_g_enum_info_get_values(PyGIBaseInfo *self)
int n_values, i;
GIValueInfo *value;
PyObject *list;
-
+
g_base_info_ref(self->info);
n_values = g_enum_info_get_n_values((GIEnumInfo*)self->info);
list = PyList_New(n_values);
for (i = 0; i < n_values; i++)
- {
- value = g_enum_info_get_value((GIEnumInfo*)self->info, i);
- PyList_SetItem(list, i, pyg_info_new(value));
- g_base_info_unref((GIBaseInfo*)value);
- }
+ {
+ value = g_enum_info_get_value((GIEnumInfo*)self->info, i);
+ PyList_SetItem(list, i, pyg_info_new(value));
+ g_base_info_unref((GIBaseInfo*)value);
+ }
g_base_info_unref(self->info);
-
+
return list;
}
@@ -801,7 +801,7 @@ _wrap_g_object_info_get_parent(PyGIBaseInfo *self)
g_base_info_unref(self->info);
if (parent_info)
- return pyg_info_new(parent_info);
+ return pyg_info_new(parent_info);
Py_INCREF(Py_None);
return Py_None;
@@ -815,7 +815,7 @@ _wrap_g_object_info_get_type_name(PyGIBaseInfo *self)
g_base_info_ref(self->info);
type_name = g_object_info_get_type_name((GIObjectInfo*)self->info);
g_base_info_unref(self->info);
-
+
return PyString_FromString(type_name);
}
@@ -831,12 +831,12 @@ _wrap_g_object_info_get_methods(PyGIBaseInfo *self)
for (i = 0; i < length; i++) {
GIFunctionInfo *function;
- function = g_object_info_get_method((GIObjectInfo*)self->info, i);
- PyTuple_SetItem(retval, i, pyg_info_new(function));
- g_base_info_unref((GIBaseInfo*)function);
+ function = g_object_info_get_method((GIObjectInfo*)self->info, i);
+ PyTuple_SetItem(retval, i, pyg_info_new(function));
+ g_base_info_unref((GIBaseInfo*)function);
}
g_base_info_unref(self->info);
-
+
return retval;
}
@@ -999,7 +999,7 @@ _wrap_g_value_info_get_value(PyGIBaseInfo *self)
g_base_info_ref(self->info);
value = g_value_info_get_value((GIValueInfo*)self->info);
g_base_info_unref(self->info);
-
+
return PyLong_FromLong(value);
}
@@ -1159,11 +1159,11 @@ static PyObject *
_wrap_g_type_info_get_param_type(PyGIBaseInfo *self, PyObject *args)
{
int index;
-
+
if (!PyArg_ParseTuple(args, "i:TypeInfo.getParamType",
- &index))
- return NULL;
-
+ &index))
+ return NULL;
+
return pyg_info_new(g_type_info_get_param_type((GITypeInfo*)self->info, index));
}
@@ -1191,3 +1191,4 @@ static PyMethodDef _PyGIUnresolvedInfo_methods[] = {
{ NULL, NULL, 0 }
};
+
diff --git a/bank/bank.c b/bank/bank.c
index c63d5ed..3ee8180 100644
--- a/bank/bank.c
+++ b/bank/bank.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 sw=4 noet ai cindent :
- *
+ *
* Copyright (C) 2005 Johan Dahlin <johan gnome org>
*
* This library is free software; you can redistribute it and/or
@@ -26,7 +26,7 @@
type.tp_alloc = PyType_GenericAlloc; \
type.tp_new = PyType_GenericNew; \
if (PyType_Ready(&type)) \
- return; \
+ return; \
PyDict_SetItemString(d, name, (PyObject *)&type); \
Py_INCREF(&type);
@@ -59,43 +59,43 @@ register_types(PyObject *d)
REGISTER_TYPE(d, PyGIRepository_Type, "Repository");
REGISTER_TYPE(d, PyGIBaseInfo_Type, "BaseInfo");
REGISTER_SUBTYPE(d, PyGIUnresolvedInfo_Type,
- "UnresolvedInfo", PyGIBaseInfo_Type);
+ "UnresolvedInfo", PyGIBaseInfo_Type);
REGISTER_SUBTYPE(d, PyGICallableInfo_Type,
- "CallableInfo", PyGIBaseInfo_Type);
+ "CallableInfo", PyGIBaseInfo_Type);
REGISTER_SUBTYPE(d, PyGIFunctionInfo_Type,
- "FunctionInfo", PyGICallableInfo_Type);
+ "FunctionInfo", PyGICallableInfo_Type);
REGISTER_SUBTYPE(d, PyGICallbackInfo_Type,
- "CallbackInfo", PyGICallableInfo_Type);
+ "CallbackInfo", PyGICallableInfo_Type);
REGISTER_SUBTYPE(d, PyGIRegisteredTypeInfo_Type,
- "RegisteredTypeInfo", PyGIBaseInfo_Type);
+ "RegisteredTypeInfo", PyGIBaseInfo_Type);
REGISTER_SUBTYPE(d, PyGIStructInfo_Type,
- "StructInfo", PyGIRegisteredTypeInfo_Type);
+ "StructInfo", PyGIRegisteredTypeInfo_Type);
REGISTER_SUBTYPE(d, PyGIEnumInfo_Type,
- "EnumInfo", PyGIRegisteredTypeInfo_Type);
+ "EnumInfo", PyGIRegisteredTypeInfo_Type);
REGISTER_SUBTYPE(d, PyGIObjectInfo_Type,
- "ObjectInfo", PyGIRegisteredTypeInfo_Type);
+ "ObjectInfo", PyGIRegisteredTypeInfo_Type);
REGISTER_SUBTYPE(d, PyGIBoxedInfo_Type,
- "BoxedInfo", PyGIRegisteredTypeInfo_Type);
+ "BoxedInfo", PyGIRegisteredTypeInfo_Type);
REGISTER_SUBTYPE(d, PyGIInterfaceInfo_Type,
- "InterfaceInfo", PyGIRegisteredTypeInfo_Type);
+ "InterfaceInfo", PyGIRegisteredTypeInfo_Type);
REGISTER_SUBTYPE(d, PyGIConstantInfo_Type,
- "ConstantInfo", PyGIBaseInfo_Type);
+ "ConstantInfo", PyGIBaseInfo_Type);
REGISTER_SUBTYPE(d, PyGIValueInfo_Type,
- "ValueInfo", PyGIBaseInfo_Type);
+ "ValueInfo", PyGIBaseInfo_Type);
REGISTER_SUBTYPE(d, PyGISignalInfo_Type,
- "SignalInfo", PyGICallableInfo_Type);
+ "SignalInfo", PyGICallableInfo_Type);
REGISTER_SUBTYPE(d, PyGIVFuncInfo_Type,
- "VFuncInfo", PyGICallableInfo_Type);
+ "VFuncInfo", PyGICallableInfo_Type);
REGISTER_SUBTYPE(d, PyGIPropertyInfo_Type,
- "PropertyInfo", PyGIBaseInfo_Type);
+ "PropertyInfo", PyGIBaseInfo_Type);
REGISTER_SUBTYPE(d, PyGIFieldInfo_Type,
- "FieldInfo", PyGIBaseInfo_Type);
+ "FieldInfo", PyGIBaseInfo_Type);
REGISTER_SUBTYPE(d, PyGIArgInfo_Type,
- "ArgInfo", PyGIBaseInfo_Type);
+ "ArgInfo", PyGIBaseInfo_Type);
REGISTER_SUBTYPE(d, PyGITypeInfo_Type,
- "TypeInfo", PyGIBaseInfo_Type);
+ "TypeInfo", PyGIBaseInfo_Type);
REGISTER_SUBTYPE(d, PyGIUnionInfo_Type,
- "UnionInfo", PyGIRegisteredTypeInfo_Type);
+ "UnionInfo", PyGIRegisteredTypeInfo_Type);
}
static void
@@ -142,7 +142,7 @@ void
initrepo(void)
{
PyObject *d, *m;
-
+
m = Py_InitModule("bank.repo", pybank_functions);
d = PyModule_GetDict(m);
@@ -152,3 +152,4 @@ initrepo(void)
register_types(d);
register_constants(m);
}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]