Convert PyUnicodeObject to PyBytesObject in python3.x?

gmail switch2mathan at gmail.com
Mon May 17 03:22:22 EDT 2010


Hi All,

A variable whose data type is PyUnicodeObject needs to passed to a function as an argument whose data type should be PyBytesObject type 

example :

PyUnicodeObject *p = ...whatever...; 
function (PyByteObject* a); 

function((PyBytesObject *)p);

compiled and got a Bus Error.

Thanks for spending ur valuable time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100516/816cf2f9/attachment.html>


More information about the Python-list mailing list