Conversion method for PyUnicodeObject type to PyBytesObject type

mathan kumar switch2mathan at gmail.com
Mon May 17 06:12:45 EDT 2010


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

example :
function (PyByteObject* a){
.....operations....
}
PyUnicodeObject *p = somevalue;
function((PyBytesObject *)p);

ouptut: Got a Bus Error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100517/fb6a4dbf/attachment.html>


More information about the Python-list mailing list