[issue5074] python3 and ctypes, script causes crash

Gabriel Genellina report at bugs.python.org
Tue Jan 27 08:01:50 CET 2009


Gabriel Genellina <gagsl-py2 at yahoo.com.ar> added the comment:

3rd argument to GetEnvironmentVariableW is the buffer size in 
*characters*, not bytes. Your buffer has room for 20 characters only, 
not 40. You should use create_unicode_buffer instead.

Probably the names create_unicode_buffer/create_string_buffer should be 
revised in 3.x

----------
nosy: +gagenellina

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5074>
_______________________________________


More information about the Python-bugs-list mailing list