where is the PyString_AsString in Python 3.0?
benjamin at python.org
Sat Mar 7 04:55:56 CET 2009
BigHand <heweiwei <at> gmail.com> writes:
> Finally I got the results now. This did take me 10 hours to solve
> this. the docs of 3.0......
> I hope this could help someone else:
> const char *strExcType = PyBytes_AS_STRING(pyStr);
You can't Py_DECREF() pyStr while holding on to strExcType because
PyBytes_AS_STRING just yields a reference to the internal contents of the object.
More information about the Python-list