Closed myusernameisunique closed 8 months ago
long double
pointer per se works:
from ctypes import c_double, c_longdouble, POINTER
...
bar = POINTER(c_longdouble)()
So I presume that it's the array conversion, rather than pointer conversion that's the issue. (Historically, long double
was left out there, b/c Python's module array
does not support long double
.)
Yes, long double
apparently uses a format code of g
, whereas cppyy is expecting D
. Is fixed in repo.
Released with release 3.1.0. Feel free to reopen if you continue to have issues.
I am able to create an array of int, bool, float, and double and successfully pass them to a custom c function using cppyy, but when I try the same with long double, it fails and I get the following output:
Here is the python code I used:
I ran the python script in 2 different environments and both yield the same result. Here they are: