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); > Py_XDECREF(str_exc_type); > Py_XDECREF(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. -- http://mail.python.org/mailman/listinfo/python-list