diff options
Diffstat (limited to 'gobject/pygobject.c')
-rw-r--r-- | gobject/pygobject.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/gobject/pygobject.c b/gobject/pygobject.c index 7170bb06..590bdbdf 100644 --- a/gobject/pygobject.c +++ b/gobject/pygobject.c @@ -242,7 +242,7 @@ build_parameter_list(GObjectClass *class) name = g_strdup(g_param_spec_get_name(props[i])); /* hyphens cannot belong in identifiers */ g_strdelimit(name, "-", '_'); - prop_str = _PyUnicode_FromString(name); + prop_str = PYGLIB_PyUnicode_FromString(name); PyList_SetItem(props_list, i, prop_str); g_free(name); @@ -263,7 +263,7 @@ PyGProps_getattro(PyGProps *self, PyObject *attr) GValue value = { 0, }; PyObject *ret; - attr_name = _PyUnicode_AsString(attr); + attr_name = PYGLIB_PyUnicode_AsString(attr); if (!attr_name) { PyErr_Clear(); return PyObject_GenericGetAttr((PyObject *)self, attr); @@ -353,7 +353,7 @@ PyGProps_setattro(PyGProps *self, PyObject *attr, PyObject *pvalue) return -1; } - attr_name = _PyUnicode_AsString(attr); + attr_name = PYGLIB_PyUnicode_AsString(attr); if (!attr_name) { PyErr_Clear(); return PyObject_GenericSetAttr((PyObject *)self, attr, pvalue); @@ -525,7 +525,7 @@ pygobject_register_class(PyObject *dict, const gchar *type_name, */ s = strrchr(type->tp_name, '.'); if (s != NULL) { - mod_name = _PyUnicode_FromStringAndSize(type->tp_name, (int)(s - type->tp_name)); + mod_name = PYGLIB_PyUnicode_FromStringAndSize(type->tp_name, (int)(s - type->tp_name)); PyDict_SetItemString(type->tp_dict, "__module__", mod_name); Py_DECREF(mod_name); } @@ -1054,7 +1054,7 @@ pygobject_repr(PyGObject *self) (long)self, self->obj ? G_OBJECT_TYPE_NAME(self->obj) : "uninitialized", (long)self->obj); - return _PyUnicode_FromString(buf); + return PYGLIB_PyUnicode_FromString(buf); } @@ -1146,7 +1146,7 @@ pygobject_init(PyGObject *self, PyObject *args, PyObject *kwargs) params = g_new0(GParameter, PyDict_Size(kwargs)); while (PyDict_Next (kwargs, &pos, &key, &value)) { GParamSpec *pspec; - gchar *key_str = _PyUnicode_AsString(key); + gchar *key_str = PYGLIB_PyUnicode_AsString(key); pspec = g_object_class_find_property (class, key_str); if (!pspec) { @@ -1252,13 +1252,13 @@ pygobject_get_properties(PyGObject *self, PyObject *args) GValue value = { 0 }; PyObject *item; - if (!_PyUnicode_Check(py_property)) { + if (!PYGLIB_PyUnicode_Check(py_property)) { PyErr_SetString(PyExc_TypeError, "Expected string argument for property."); return NULL; } - property_name = _PyUnicode_AsString(py_property); + property_name = PYGLIB_PyUnicode_AsString(py_property); pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(self->obj), property_name); @@ -1332,7 +1332,7 @@ pygobject_set_properties(PyGObject *self, PyObject *args, PyObject *kwargs) pos = 0; while (kwargs && PyDict_Next (kwargs, &pos, &key, &value)) { - gchar *key_str = _PyUnicode_AsString(key); + gchar *key_str = PYGLIB_PyUnicode_AsString(key); GParamSpec *pspec; pspec = g_object_class_find_property(class, key_str); @@ -1469,7 +1469,7 @@ pygobject_connect(PyGObject *self, PyObject *args) if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj), &sigid, &detail, TRUE)) { PyObject *repr = PyObject_Repr((PyObject*)self); - const char* ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); + const char* ptr = (repr ? PYGLIB_PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", (ptr ? ptr : "<?>"), name); Py_CLEAR(repr); @@ -1520,7 +1520,7 @@ pygobject_connect_after(PyGObject *self, PyObject *args) if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj), &sigid, &detail, TRUE)) { PyObject *repr = PyObject_Repr((PyObject*)self); - const char* ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); + const char* ptr = (repr ? PYGLIB_PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", (ptr ? ptr : "<?>"), name); Py_CLEAR(repr); @@ -1571,7 +1571,7 @@ pygobject_connect_object(PyGObject *self, PyObject *args) if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj), &sigid, &detail, TRUE)) { PyObject *repr = PyObject_Repr((PyObject*)self); - const char* ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); + const char* ptr = (repr ? PYGLIB_PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", (ptr ? ptr : "<?>"), name); Py_CLEAR(repr); @@ -1622,7 +1622,7 @@ pygobject_connect_object_after(PyGObject *self, PyObject *args) if (!g_signal_parse_name(name, G_OBJECT_TYPE(self->obj), &sigid, &detail, TRUE)) { PyObject *repr = PyObject_Repr((PyObject*)self); - const char* ptr = (repr ? _PyUnicode_AsString(repr) : "<?>"); + const char* ptr = (repr ? PYGLIB_PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "%s: unknown signal name: %s", (ptr ? ptr : "<?>"), name); Py_CLEAR(repr); @@ -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 ? _PyUnicode_AsString(repr) : "<?>"); + const char* ptr = (repr ? PYGLIB_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 ? _PyUnicode_AsString(repr) : "<?>"); + const char* ptr = (repr ? PYGLIB_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 ? _PyUnicode_AsString(repr) : "<?>"); + const char* ptr = (repr ? PYGLIB_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 ? _PyUnicode_AsString(repr) : "<?>"); + const char* ptr = (repr ? PYGLIB_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 ? _PyUnicode_AsString(repr) : "<?>"); + const char* ptr = (repr ? PYGLIB_PyUnicode_AsString(repr) : "<?>"); PyErr_Format(PyExc_TypeError, "nothing connected to %s", (ptr ? ptr : "<?>")); Py_CLEAR(repr); @@ -2324,7 +2324,7 @@ pygobject_object_register_types(PyObject *d) descr = PyObject_New(PyObject, &PyGPropsDescr_Type); PyDict_SetItemString(PyGObject_Type.tp_dict, "props", descr); PyDict_SetItemString(PyGObject_Type.tp_dict, "__module__", - o=_PyUnicode_FromString("gobject._gobject")); + o=PYGLIB_PyUnicode_FromString("gobject._gobject")); Py_DECREF(o); /* GPropsIter */ |