summaryrefslogtreecommitdiffstats
path: root/gobject/pyginterface.c
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-07-27 10:07:55 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-07-27 10:07:55 +0000
commit99f90ceb215313ca0e34510f7a080339f48e12ce (patch)
treea9d9e9a35263281b7cab7f54f18d9bf4eb3f26c0 /gobject/pyginterface.c
parent2c9df6000e93158e14cf279e0cf3ee19acad11d0 (diff)
downloadpygobject-99f90ceb215313ca0e34510f7a080339f48e12ce.tar.gz
pygobject-99f90ceb215313ca0e34510f7a080339f48e12ce.tar.xz
pygobject-99f90ceb215313ca0e34510f7a080339f48e12ce.zip
Use the Py_TYPE macro everywhere.
2008-07-27 Johan Dahlin <johan@gnome.org> * glib/pyglib-python-compat.h: * gobject/gobjectmodule.c (pyg_object_new), (pyg__install_metaclass): * gobject/pygboxed.c (pyg_boxed_dealloc), (pyg_boxed_init), (pyg_register_boxed): * gobject/pygenum.c (pyg_enum_reduce): * gobject/pyginterface.c (pyg_interface_init), (pyg_register_interface): * gobject/pygobject.c (pygobject_get_inst_data), (pygobject_register_class), (pygobject_new_with_interfaces), (pygobject_dealloc), (pygobject_repr), (pygobject_emit), (pygobject_chain_from_overridden), (pygobject_weak_ref_notify): * gobject/pygparamspec.c (pygobject_paramspec_register_types): * gobject/pygpointer.c (pyg_pointer_dealloc), (pyg_pointer_init), (pyg_register_pointer): * gobject/pygtype.c (pyg_type_from_object), (pyg_value_array_from_pyobject), (pyg_value_from_pyobject), (pyg_object_descr_doc_get): Use the Py_TYPE macro everywhere. svn path=/trunk/; revision=886
Diffstat (limited to 'gobject/pyginterface.c')
-rw-r--r--gobject/pyginterface.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gobject/pyginterface.c b/gobject/pyginterface.c
index 815df30..2a17574 100644
--- a/gobject/pyginterface.c
+++ b/gobject/pyginterface.c
@@ -41,7 +41,8 @@ pyg_interface_init(PyObject *self, PyObject *args, PyObject *kwargs)
if (!PyArg_ParseTuple(args, ":GInterface.__init__"))
return -1;
- g_snprintf(buf, sizeof(buf), "%s can not be constructed", self->ob_type->tp_name);
+ g_snprintf(buf, sizeof(buf), "%s can not be constructed",
+ Py_TYPE(self)->tp_name);
PyErr_SetString(PyExc_NotImplementedError, buf);
return -1;
}
@@ -69,7 +70,7 @@ pyg_register_interface(PyObject *dict, const gchar *class_name,
{
PyObject *o;
- type->ob_type = &PyType_Type;
+ Py_TYPE(type) = &PyType_Type;
type->tp_base = &PyGInterface_Type;
if (PyType_Ready(type) < 0) {