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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dbus_bindings/bytes.c b/dbus_bindings/bytes.c
index 873a2fa..611d239 100644
--- a/dbus_bindings/bytes.c
+++ b/dbus_bindings/bytes.c
@@ -2,6 +2,8 @@
*
* Copyright (C) 2006 Collabora Ltd. <http://www.collabora.co.uk/>
*
+ * SPDX-License-Identifier: MIT
+ *
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
@@ -278,11 +280,15 @@ dbus_py_init_byte_types(void)
{
DBusPyByte_Type.tp_base = &DBUS_PY_BYTE_BASE;
if (PyType_Ready(&DBusPyByte_Type) < 0) return 0;
+#ifndef PY3
DBusPyByte_Type.tp_print = NULL;
+#endif
DBusPyByteArray_Type.tp_base = &DBUS_PY_BYTEARRAY_BASE;
if (PyType_Ready(&DBusPyByteArray_Type) < 0) return 0;
+#ifndef PY3
DBusPyByteArray_Type.tp_print = NULL;
+#endif
return 1;
}