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 /gobject | |
| parent | f6f2ed44c84aff3c38fc3eb5961b28621a14fc51 (diff) | |
| download | pygobject-97a35ad4bf0623636459735e119d1b0fe0ede5ff.tar.gz pygobject-97a35ad4bf0623636459735e119d1b0fe0ede5ff.tar.xz pygobject-97a35ad4bf0623636459735e119d1b0fe0ede5ff.zip | |
Remove remaining PyInt & PyString calls
Diffstat (limited to 'gobject')
| -rw-r--r-- | gobject/gobjectmodule.c | 6 | ||||
| -rw-r--r-- | gobject/pygobject.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index d431d6a..9a10be5 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -140,7 +140,7 @@ pyg_type_from_name (PyObject *self, PyObject *args) if (type != 0) return pyg_type_wrapper_new(type); repr = PyObject_Repr((PyObject*)self); - repr_ptr = (repr ? PyString_AsString(repr) : "<?>"); + repr_ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_RuntimeError, "%s: unknown type name: %s", (repr_ptr ? repr_ptr : "<?>"), name); Py_CLEAR(repr); @@ -1926,7 +1926,7 @@ pyg_add_emission_hook(PyGObject *self, PyObject *args) if (!g_signal_parse_name(name, gtype, &sigid, &detail, TRUE)) { PyObject *repr = PyObject_Repr((PyObject*)self); - const char *repr_ptr = (repr ? PyString_AsString(repr) : "<?>"); + const char *repr_ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", (repr_ptr ? repr_ptr : "<?>"), name); Py_CLEAR(repr); @@ -1967,7 +1967,7 @@ pyg_remove_emission_hook(PyGObject *self, PyObject *args) if (!g_signal_parse_name(name, gtype, &signal_id, NULL, TRUE)) { PyObject *repr = PyObject_Repr((PyObject*)self); - const char *repr_ptr = (repr ? PyString_AsString(repr) : "<?>"); + const char *repr_ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", (repr_ptr ? repr_ptr : "<?>"), name); Py_CLEAR(repr); diff --git a/gobject/pygobject.c b/gobject/pygobject.c index 28a2a37..33cb927 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -1723,7 +1723,7 @@ pygobject_emit(PyGObject *self, PyObject *args) if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj), &signal_id, &detail, TRUE)) { PyObject *repr = PyObject_Repr((PyObject*)self); - const char* ptr = (repr ? PyString_AsString(repr) : "<?>"); + const char* ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", (ptr ? ptr : "<?>"), name); Py_CLEAR(repr); @@ -1801,7 +1801,7 @@ pygobject_stop_emission(PyGObject *self, PyObject *args) if (!g_signal_parse_name(signal, G_OBJECT_TYPE(self->obj), &signal_id, &detail, TRUE)) { PyObject *repr = PyObject_Repr((PyObject*)self); - const char* ptr = (repr ? PyString_AsString(repr) : "<?>"); + const char* ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", (ptr ? ptr : "<?>"), signal); Py_CLEAR(repr); @@ -1951,7 +1951,7 @@ pygobject_disconnect_by_func(PyGObject *self, PyObject *args) closure = gclosure_from_pyfunc(self, pyfunc); if (!closure) { PyObject *repr = PyObject_Repr(pyfunc); - const char* ptr = (repr ? PyString_AsString(repr) : "<?>"); + const char* ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "nothing connected to %s", (ptr ? ptr : "<?>")); Py_CLEAR(repr); @@ -1986,7 +1986,7 @@ pygobject_handler_block_by_func(PyGObject *self, PyObject *args) closure = gclosure_from_pyfunc(self, pyfunc); if (!closure) { PyObject *repr = PyObject_Repr(pyfunc); - const char* ptr = (repr ? PyString_AsString(repr) : "<?>"); + const char* ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "nothing connected to %s", (ptr ? ptr : "<?>")); Py_CLEAR(repr); @@ -2021,7 +2021,7 @@ pygobject_handler_unblock_by_func(PyGObject *self, PyObject *args) closure = gclosure_from_pyfunc(self, pyfunc); if (!closure) { PyObject *repr = PyObject_Repr(pyfunc); - const char* ptr = (repr ? PyString_AsString(repr) : "<?>"); + const char* ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "nothing connected to %s", (ptr ? ptr : "<?>")); Py_CLEAR(repr); |
