Aviv Palivoda added the comment: I actually was wrong and there is no problem with the type that is returned from the text_factory as it passes directly as argument for the create_function function.
Attached is a patch that change create_function and create_aggregate to use the text_factory when a TEXT data type is received. I am now using sqlite3_create_function_v2 but this is fine because we use sqlite3_stmt_readonly and it is from a newer version. As for Ingo example code it still don't work with this current fix but this is due to a different problem. Now the _pysqlite_set_result function fail when we do PyUnicode_AsUTF8 on the result from py_identity. As this is a different problem I will fix this in a different patch. ---------- keywords: +patch Added file: http://bugs.python.org/file46164/29021.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29021> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com