summaryrefslogtreecommitdiff
path: root/_dbus_bindings/bytes.c
diff options
context:
space:
mode:
Diffstat (limited to '_dbus_bindings/bytes.c')
-rw-r--r--_dbus_bindings/bytes.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/_dbus_bindings/bytes.c b/_dbus_bindings/bytes.c
index 548ca46..e053f43 100644
--- a/_dbus_bindings/bytes.c
+++ b/_dbus_bindings/bytes.c
@@ -96,20 +96,6 @@ Byte_new(PyTypeObject *cls, PyObject *args, PyObject *kwargs)
if (!obj)
goto bad_arg;
}
- else if (PyUnicode_Check(obj)) {
- PyObject *obj_as_bytes = PyUnicode_AsUTF8String(obj);
- if (!obj_as_bytes)
- return NULL;
- if (PyBytes_GET_SIZE(obj_as_bytes) != 1) {
- Py_CLEAR(obj_as_bytes);
- goto bad_arg;
- }
- obj = PyLong_FromLong(
- (unsigned char)PyBytes_AS_STRING(obj_as_bytes)[0]);
- Py_CLEAR(obj_as_bytes);
- if (!obj)
- goto bad_arg;
- }
else if (PyLong_Check(obj)
#ifndef PY3
|| PyInt_Check(obj)