diff options
author | John Ehresman <jpe@wingware.com> | 2010-04-12 23:51:24 -0400 |
---|---|---|
committer | John Ehresman <jpe@wingware.com> | 2010-04-15 12:13:35 -0400 |
commit | 97a35ad4bf0623636459735e119d1b0fe0ede5ff (patch) | |
tree | ab8db69290c067933da2064b501577073825e94b /gio | |
parent | f6f2ed44c84aff3c38fc3eb5961b28621a14fc51 (diff) | |
download | pygobject-97a35ad4bf0623636459735e119d1b0fe0ede5ff.tar.gz pygobject-97a35ad4bf0623636459735e119d1b0fe0ede5ff.tar.xz pygobject-97a35ad4bf0623636459735e119d1b0fe0ede5ff.zip |
Remove remaining PyInt & PyString calls
Diffstat (limited to 'gio')
-rw-r--r-- | gio/pygio-utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gio/pygio-utils.c b/gio/pygio-utils.c index be41453..f51040c 100644 --- a/gio/pygio-utils.c +++ b/gio/pygio-utils.c @@ -116,13 +116,13 @@ pygio_pylist_to_uri_glist(PyObject *pyfile_list) len = PySequence_Size(pyfile_list); for (i = 0; i < len; i++) { item = PySequence_GetItem(pyfile_list, i); - if (!PyString_Check(item)) { + if (!_PyUnicode_Check(item)) { PyErr_SetString(PyExc_TypeError, "files must be strings"); g_list_free(file_list); return NULL; } - file_list = g_list_prepend(file_list, PyString_AsString(item)); + file_list = g_list_prepend(file_list, _PyUnicode_AsString(item)); } file_list = g_list_reverse(file_list); @@ -145,7 +145,7 @@ strv_to_pylist (char **strv) list = PyList_New (len); for (i = 0; i < len; i++) - PyList_SetItem (list, i, PyString_FromString (strv[i])); + PyList_SetItem (list, i, _PyUnicode_FromString (strv[i])); return list; } @@ -191,7 +191,7 @@ pylist_to_strv (PyObject *list, return FALSE; } - if (!PyString_Check (item)) + if (!_PyUnicode_Check (item)) { Py_DECREF (item); g_strfreev (ret); @@ -199,7 +199,7 @@ pylist_to_strv (PyObject *list, return FALSE; } - ret[i] = g_strdup (PyString_AsString (item)); + ret[i] = g_strdup (_PyUnicode_AsString (item)); Py_DECREF (item); } |