On Fri, Sep 3, 2010 at 6:01 PM, M.-A. Lemburg <m...@egenix.com> wrote: >> About PyUnicode_strdup() (PyUnicode_AsUnicodeCopy): I don't know. It is >> possible to rewrite it in few lines. Why don't you want to add them to the >> public API? For my work, it doesn't matter if it's public or not. This >> function uses PyMem_xxx API, I don't know if a third part library would like >> to rely on PyMem_xxx. > > This will have to be documented (see PEP 384 for some reasoning on > malloc() use in DLLs).
PyUnicode_AsUnicodeCopy is indeed a better name. As far as the need to call PyMem_Free goes, a similar requirement already exists for argument parsing via es and es# (see http://docs.python.org/dev/c-api/arg.html#strings-and-buffers), so just documenting it is fine. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com