Antoine Pitrou <pit...@free.fr> added the comment: > I would like to update the `write_utf8` function but I would need to find a > way to wrap `const char* data` as a PyBytes instance without making a memory > copy to be able to pass it to my `_Pickle_write_large_bytes`.
You should pass it as a memoryview instead: https://docs.python.org/3/c-api/memoryview.html#c.PyMemoryView_FromMemory ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31993> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com