pyext: missing cast to constant char* (#5713)
We need to cast to a constant charpointer here.
This commit is contained in:
parent
89b914f81d
commit
3a538fc91e
@ -43,9 +43,11 @@
|
||||
#error "Python 3.0 - 3.2 are not supported."
|
||||
#endif
|
||||
#define PyString_AsStringAndSize(ob, charpp, sizep) \
|
||||
(PyUnicode_Check(ob)? \
|
||||
((*(charpp) = PyUnicode_AsUTF8AndSize(ob, (sizep))) == NULL? -1: 0): \
|
||||
PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
|
||||
(PyUnicode_Check(ob) ? ((*(charpp) = const_cast<char*>( \
|
||||
PyUnicode_AsUTF8AndSize(ob, (sizep)))) == NULL \
|
||||
? -1 \
|
||||
: 0) \
|
||||
: PyBytes_AsStringAndSize(ob, (charpp), (sizep)))
|
||||
#endif
|
||||
|
||||
namespace google {
|
||||
|
Loading…
Reference in New Issue
Block a user