An Array is not compatible with a julia method expecting a Ptr; it can
only be passed to a ccall that expects a Ptr. In julia Array and Ptr
are just different types. I would recommend not writing julia methods
with ::Ptr arguments. Another reason is that if you pass Ptrs around
too much you risk hi
Still doesn't work but getting closer
julia> using GMT; API=create_session(); dim=uint64([2,9]);
julia> V = create_data (API, 5, 1, 0)
Ptr{Void} @0x
julia> V = create_data (API, 5, 1, 0, dim)
ERROR: no method create_data(Ptr{None}, Int64, Int64, Int64, Array{Uint64,1
})
so its t
I think Jacob was suggesting something like this:
function create_data(API::Ptr{None}, family=5, geometry=1, mode=0,
par::Ptr=C_NULL,
wesn::Ptr=C_NULL, inc::Ptr=C_NULL, reg=0, pad=2,
data::Ptr{None}=C_NULL)
Have you tried that? (The Ptr types are loosened by removing the type
parameter).
Thanks, but if I try without default values
function create_data(API::Ptr{None}, family, geometry, mode, par::Ptr{
Culonglong},
wesn::Ptr{Cdouble}, inc::Ptr{Cdouble}, reg, pad, data::Ptr{None})
I still get the same error, and note that the Culonglong was not using the
C_NULL default valu
Not sure, but my guess would be that C_NULL is not being accepted as a
Ptr{Culonglong} or Ptr{Cdouble} since it's type is Ptr{Void} (or
Ptr{None}). You can either remove those type annotations or just use Ptr as
the type annotation to test this theory.
-Jacob
On Mon, Mar 10, 2014 at 8:20 PM, J L
I have spend some hours around this but I'm not getting nowhere. The
following C function has this signature
void *GMT_Create_Data (void *API, unsigned int family, unsigned int geometry
,
unsigned int mode, uint64_t par[], double *wesn,
double *inc,