Jim Jewett <jimjjew...@gmail.com> added the comment:

>> Why is the utf-8 representation not cached when it is generated for
>> ParseTuple et alia?

My error -- I read something backwards.

>> When a string is created from a wchar_t array, who is responsible for
>> releasing the original wchar_t array?

> The caller.

OK, I'll document that.

>> As I read it now, Python
>> doesn't release the buffer, and the caller can't because maybe Python
>> just pointed to it as memory shared with the canonical
>> representation.

> But Python won't; it will always make a copy for itself.

I thought I found an example each way, but it is possible that the shared 
version was something python had already copied.  If not, I'll raise that as a 
separate issue to get the code changed.

(Note that I may not be able to look at this again until after Christmas, so 
I'm likely to go silent for a while.)

----------
Added file: http://bugs.python.org/file23979/pep-0393.txt

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to