Fix python2 build with clang 15
PyUnicode_AsUTF8AndSize is only available in python3.
This commit is contained in:
parent
bad92ab48e
commit
3ef48655d6
@ -6,7 +6,7 @@ GH_COMMIT= 206bca0b90f5780815c0b6c6cbccfd03f27f6985
|
||||
|
||||
DISTNAME= rcsparse-20151027
|
||||
PKGNAME= py-${DISTNAME}
|
||||
REVISION= 3
|
||||
REVISION= 4
|
||||
|
||||
CATEGORIES= devel
|
||||
|
||||
|
@ -10,13 +10,13 @@ Index: py-rcsparse.c
|
||||
+#define PyString_CheckExact PyUnicode_CheckExact
|
||||
+#define PyString_FromString PyUnicode_FromString
|
||||
+#define PyString_FromStringAndSize PyUnicode_FromStringAndSize
|
||||
+#endif
|
||||
+
|
||||
+static void
|
||||
+_PyUnicode_AsUTF8AndSize(PyObject *obj, char **strp, Py_ssize_t *sizep)
|
||||
+{
|
||||
+ *strp = PyUnicode_AsUTF8AndSize(obj, sizep);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static PyObject *
|
||||
rcstoken2pystr(struct rcstoken *tok)
|
||||
|
Loading…
x
Reference in New Issue
Block a user