Help with pointers when calling from python to C
Nobody
nobody at nowhere.com
Sun Oct 10 06:32:45 EDT 2010
More information about the Python-list mailing list
Sun Oct 10 06:32:45 EDT 2010
- Previous message (by thread): Help with pointers when calling from python to C
- Next message (by thread): Sex And The City
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 08 Oct 2010 18:02:15 +0200, Jonas H. wrote: > On 10/08/2010 05:23 PM, Carolyn MacLeod wrote: >> "How do I pass an integer by reference to a C function?" > > That's impossible in pure Python. The only thing I can think of is a > wrapper in C. I didn't see the original message, but if you're using ctypes, create a c_int value and use byref(): i = c_int(42) myfunc(byref(i)) print i http://docs.python.org/library/ctypes.html#passing-pointers-or-passing-parameters-by-reference
- Previous message (by thread): Help with pointers when calling from python to C
- Next message (by thread): Sex And The City
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list