Antoine Pitrou <pit...@free.fr> added the comment: > I'm completely new to the C API so not sure if the way I am building > python strings (to pass to save_global) is correct
It's correct but it's probably less efficient than calling a more specialized function, such as PyUnicode_FromString(): http://docs.python.org/dev/c-api/unicode.html#PyUnicode_FromString You also have to check the return value (for non-NULL, NULL meaning an error occurred) before calling save_global with it. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13842> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com