Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Your function returns a borrowed reference. It xiuld cause ceash even without calling PyUnicode_AsUTF8AndSize. Add Py_INCREF(str) ---------- nosy: +serhiy.storchaka resolution: -> not a bug _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39113> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com