[issue22945] Ctypes inconsistent between Linux and OS X

Daniel Standage report at bugs.python.org
Wed Nov 26 05:46:50 CET 2014


New submission from Daniel Standage:

The ctypes documentation describes the '._as_parameter_' attribute, which simplifies using Python objects to encapsulate C objects. If a ctypes object with the '._as_parameter_' attribute defined is passed as a parameter to a C function, the value of '._as_parameter_' is supplied to the C function instead of a pointer to the Python project.

At least that's how it's advertised to work. And it does indeed work as advertised on Linux, but on Mac OS X the mechanism doesn't appear to work correctly. I have created a small dummy example demonstrating this at https://github.com/standage/ctypes-demo.

----------
components: ctypes
hgrepos: 281
messages: 231692
nosy: Daniel.Standage
priority: normal
severity: normal
status: open
title: Ctypes inconsistent between Linux and OS X
type: behavior
versions: Python 2.7

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


More information about the Python-bugs-list mailing list