[New-bugs-announce] [issue30634] ctypes.cast(obj, ctypes.c_void_p) invalid return in linux_x64

fooofei report at bugs.python.org
Mon Jun 12 04:56:44 EDT 2017


New submission from fooofei:

module:ctypes
pyversion: 2.7.13
python platform : win32, linux_x86_x64

I use ctypes.cast(v,ctypes.c_void_p).value to get address of 'helloworld' and u'helloworld' internal buffer address.

the result is both right in win32,but not in linux.

'helloworld'  is right, u'helloworld' is invalid.

please see 
https://github.com/fooofei/py_string_address
https://github.com/fooofei/py_string_address/blob/master/issue.py

----------
components: ctypes
messages: 295758
nosy: fooofei
priority: normal
severity: normal
status: open
title: ctypes.cast(obj,ctypes.c_void_p) invalid return in linux_x64
type: behavior
versions: Python 2.7

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


More information about the New-bugs-announce mailing list