Hi.
Sorry for silly question, but how to use @cfunction in the foolowing case:
Suppose we bind class:
types.add_type<DataBase>("Database")
.method("GetProperty", &DataBase::getProperty);
and write julia function which take this class:
function Eg(db::CppTypes.Database, mat::Cint)
return GetProperty(db, mat)
end
and try to get cfunction pointer on this function from c++:
auto *eg = (double (*)(DataBase *, int)) jl_unbox_voidpointer(jl_eval_string("@cfunction(Eg, Cdouble, (Ptr{Cvoid}, Cint))"));
Pointer exist, but call this is trow an exception.
where im wrong?
Binded classes wrapped on julia side
mutable struct WorldAllocated <: World
cpp_object::Ptr{Cvoid}
end
Thanks
Hi.
Sorry for silly question, but how to use
@cfunctionin the foolowing case:Suppose we bind class:
and write julia function which take this class:
and try to get
cfunctionpointer on this function from c++:Pointer exist, but call this is trow an exception.
where im wrong?
Binded classes wrapped on julia side
Thanks