From 37fe32b72d4b2530aaf28bd343c424898e45ab2c Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Sun, 27 Jul 2008 09:39:21 +0000 Subject: Use _PyLong macros. 2008-07-27 Johan Dahlin * gobject/gobjectmodule.c (pyg_param_spec_from_object), (add_properties), (pyg_signal_new), (pyg_signal_list_ids), (pyg_signal_lookup), (pyg_signal_query): * gobject/pygenum.c (pyg_enum_richcompare), (pyg_enum_new), (pyg_enum_from_gtype), (pyg_enum_add), (pyg_enum_reduce), (pygobject_enum_register_types): * gobject/pygflags.c (pyg_flags_richcompare), (pyg_flags_new), (pyg_flags_from_gtype), (pyg_flags_add), (pyg_flags_and), (pyg_flags_or), (pyg_flags_xor), (pygobject_flags_register_types): * gobject/pygobject-private.h: * gobject/pygobject.c (pygobject_disconnect_by_func), (pygobject_handler_block_by_func), (pygobject_handler_unblock_by_func), (pygobject_get_refcount): * gobject/pygparamspec.c (pyg_param_spec_getattr): * gobject/pygtype.c (_wrap_g_type_wrapper__get_depth), (pyg_type_from_object), (pyg_enum_get_value), (pyg_flags_get_value), (pyg_value_from_pyobject), (pyg_value_as_pyobject): Use _PyLong macros. svn path=/trunk/; revision=884 --- gobject/pygparamspec.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gobject/pygparamspec.c') diff --git a/gobject/pygparamspec.c b/gobject/pygparamspec.c index a6e225e..c52efeb 100644 --- a/gobject/pygparamspec.c +++ b/gobject/pygparamspec.c @@ -121,7 +121,7 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr) } else if (!strcmp(attr, "blurb") || !strcmp(attr, "__doc__")) { return Py_BuildValue("s", g_param_spec_get_blurb(pspec)); } else if (!strcmp(attr, "flags")) { - return PyInt_FromLong(pspec->flags); + return _PyLong_FromLong(pspec->flags); } else if (!strcmp(attr, "value_type")) { return pyg_type_wrapper_new(pspec->value_type); } else if (!strcmp(attr, "owner_type")) { @@ -138,9 +138,9 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr) return _PyUnicode_FromFormat( "%c", G_PARAM_SPEC_CHAR(pspec)->default_value); } else if (!strcmp(attr, "minimum")) { - return PyInt_FromLong(G_PARAM_SPEC_CHAR(pspec)->minimum); + return _PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->minimum); } else if (!strcmp(attr, "maximum")) { - return PyInt_FromLong(G_PARAM_SPEC_CHAR(pspec)->maximum); + return _PyLong_FromLong(G_PARAM_SPEC_CHAR(pspec)->maximum); } } else if (G_IS_PARAM_SPEC_UCHAR(pspec)) { if (!strcmp(attr, "__members__")) { @@ -153,9 +153,9 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr) return _PyUnicode_FromFormat( "%c", G_PARAM_SPEC_UCHAR(pspec)->default_value); } else if (!strcmp(attr, "minimum")) { - return PyInt_FromLong(G_PARAM_SPEC_UCHAR(pspec)->minimum); + return _PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->minimum); } else if (!strcmp(attr, "maximum")) { - return PyInt_FromLong(G_PARAM_SPEC_UCHAR(pspec)->maximum); + return _PyLong_FromLong(G_PARAM_SPEC_UCHAR(pspec)->maximum); } } else if (G_IS_PARAM_SPEC_BOOLEAN(pspec)) { if (!strcmp(attr, "__members__")) { @@ -173,11 +173,11 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr) "flags", "maximum", "minimum", "name", "nick", "owner_type", "value_type"); } else if (!strcmp(attr, "default_value")) { - return PyInt_FromLong(G_PARAM_SPEC_INT(pspec)->default_value); + return _PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->default_value); } else if (!strcmp(attr, "minimum")) { - return PyInt_FromLong(G_PARAM_SPEC_INT(pspec)->minimum); + return _PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->minimum); } else if (!strcmp(attr, "maximum")) { - return PyInt_FromLong(G_PARAM_SPEC_INT(pspec)->maximum); + return _PyLong_FromLong(G_PARAM_SPEC_INT(pspec)->maximum); } } else if (G_IS_PARAM_SPEC_UINT(pspec)) { if (!strcmp(attr, "__members__")) { -- cgit