Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #15444
| References | <CAN6JmWN3SMnyO+bo4oQOG1Pcpz_VReqM6_JTc6FQJHerjb40+g@mail.gmail.com> |
|---|---|
| Date | 2011-11-07 14:29 -0800 |
| Subject | Re: ctypes accessing functions with double pointers |
| From | Chris Rebert <clp2@rebertia.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2523.1320704990.27778.python-list@python.org> (permalink) |
On Mon, Nov 7, 2011 at 2:06 PM, Eleftherios Garyfallidis <garyfallidis@gmail.com> wrote: > Hello, > > Is it possible using ctypes to call C functions from a shared object > containing double pointers e.g. int foo(float **i) and if yes how? (Untested conjecture:) import ctypes # ...create ctypes_wrapped_foo... the_float = ctypes.c_float(42.1) float_ptr = ctypes.byref(the_float) i = ctypes.byref(float_ptr) result_integer = ctypes_wrapped_foo(i) Cheers, Chris
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: ctypes accessing functions with double pointers Chris Rebert <clp2@rebertia.com> - 2011-11-07 14:29 -0800
csiph-web