diff options
author | John (J5) Palmieri <johnp@redhat.com> | 2010-08-16 13:51:05 -0400 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-08-25 10:51:18 +0200 |
commit | 1efa2b12913b194d433c17014bc1077271a6ca32 (patch) | |
tree | 5f1f2743e43dd4679a493c6520292151aeba2cda /gi/pygi-repository.c | |
parent | 6b902c66200c1684513a9ef31bdef3f2ff64e4fa (diff) | |
download | pygobject-1efa2b12913b194d433c17014bc1077271a6ca32.tar.gz |
some more p3k PyString and PyInt eradication in GI
* add the glib dir to the includes list in the build
* make sure we include the compat macros
* add GLIB_PyBytes_FromString to compat macros
* add GLIB_PyNumber_Long to compat macros
* use RichCompare instead of Compare
https://bugzilla.gnome.org/show_bug.cgi?id=615872
Diffstat (limited to 'gi/pygi-repository.c')
-rw-r--r-- | gi/pygi-repository.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gi/pygi-repository.c b/gi/pygi-repository.c index fbe8ff51..79727ed1 100644 --- a/gi/pygi-repository.c +++ b/gi/pygi-repository.c @@ -23,6 +23,8 @@ #include "pygi-private.h" +#include <pyglib-python-compat.h> + PyObject *PyGIRepositoryError; static PyMethodDef _PyGIRepository_methods[]; @@ -78,7 +80,7 @@ _wrap_g_irepository_enumerate_versions (PyGIRepository *self, ret = PyList_New(0); for (item = versions; item; item = item->next) { char *version = item->data; - PyObject *py_version = PyString_FromString (version); + PyObject *py_version = PYGLIB_PyUnicode_FromString (version); PyList_Append(ret, py_version); Py_DECREF(py_version); g_free (version); @@ -236,7 +238,7 @@ _wrap_g_irepository_get_typelib_path (PyGIRepository *self, return NULL; } - return PyString_FromString (typelib_path); + return PYGLIB_PyBytes_FromString (typelib_path); } static PyObject * @@ -259,7 +261,7 @@ _wrap_g_irepository_get_version (PyGIRepository *self, return NULL; } - return PyString_FromString (version); + return PYGLIB_PyUnicode_FromString (version); } static PyMethodDef _PyGIRepository_methods[] = { |