if base_type.signed:
self.to_py_function = "__Pyx_PyObject_FromString"
if self.is_ptr:
- self.from_py_function = "__Pyx_PyObject_AsString"
+ if base_type.signed == 2:
+ self.from_py_function = "__Pyx_PyObject_AsSString"
+ else:
+ self.from_py_function = "__Pyx_PyObject_AsString"
else:
self.to_py_function = "__Pyx_PyObject_FromUString"
if self.is_ptr:
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
+#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((char*)s)
#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s)