To convert PyBytesObject type to PyUnicodeObject type in python3

Posted by sam on Stack Overflow See other posts from Stack Overflow or by sam
Published on 2010-05-17T11:25:33Z Indexed on 2010/05/17 11:30 UTC
Read the original article Hit count: 322

Filed under:
|

How to convert pyunicodeobject type to pybytesobject type?

Example:

function(PyBytesObject* byteobj){ ....operation.. }

PyUnicodeObject* Uniobj;

function((PyBytesObject*) Uniobj);

got a bus error as a result.

© Stack Overflow or respective owner

Related posts about python

Related posts about python-3.x