In python 2.x versions there is a function named as PyString_AS_STRING to convert a pyobject pointer to a string or char pointer.
How can we achieve the same functionality in python 3?
In python 2.x versions there is a function named as PyString_AS_STRING to convert a pyobject pointer to a string or char pointer.
How can we achieve the same functionality in python 3?
There's a PyUnicode_AS_UNICODE macro.
BTW: PyString_AS_STRING only works for string objects, returning a C string.