1 /*-------------------------- 2 * common utility functions 3 *-------------------------- 4 */ 5 6 #ifndef PLPY_UTIL_H 7 #define PLPY_UTIL_H 8 9 extern PyObject *PLyUnicode_Bytes(PyObject *unicode); 10 extern char *PLyUnicode_AsString(PyObject *unicode); 11 12 #if PY_MAJOR_VERSION >= 3 13 extern PyObject *PLyUnicode_FromString(const char *s); 14 extern PyObject *PLyUnicode_FromStringAndSize(const char *s, Py_ssize_t size); 15 #endif 16 17 #endif /* PLPY_UTIL_H */ 18