Ah, yes, you are right.

This actually complicates things quite a bit.  The return from `PyUnicode_AsUTF8String` needs to be DECREF'd, but `PyBytes_AsString` uses the internal object buffer, so the object can't be DECREF'd until the string is no longer in use.

The best bet may be to switch PyString to PyBytes instead of PyUnicode.  PyBytes is more or less a direct mapping from PyString.  PyBytes does not support unicode, but then again, neither does PyString.