Passing Dictionary from Julia to C function using ccall

74 views
Skip to first unread message

Alexander Lyapin

unread,
Nov 22, 2016, 2:18:25 AM11/22/16
to julia-users
Is there way to pass Dictionary from Julia to C function using ccall???

I have to divide all dictionaries for subarrays and then send them to C... this is really long and leads to huge syntax. Is there way to pass whole dictionary at once?

Thank you

Yichao Yu

unread,
Nov 22, 2016, 8:08:45 AM11/22/16
to Julia Users
Hmmm, I thought you can't start a new thread on julia-users anymore....
You can just pass a pointer to the dict to C with `Any` as argument
type. This works for any types.

Note that there's no standard representation of dict in C though so
accessing it in C is not trivial
(https://groups.google.com/forum/?fromgroups=#!msg/julia-users/E4FNM7m_Alw/3s6ePRzTAgAJ;context-place=searchin/julia-users/Julia$20embedding%7Csort:relevance)
I also can't understand what exactly you want to do .......

>
> Thank you

Stefan Karpinski

unread,
Nov 22, 2016, 9:27:19 AM11/22/16
to Julia Users
I'm not sure what's up with that – the group settings look correct (only manager, owners can start new threads), but Google Groups has confusing settings, doesn't always do what it's configured to do and is otherwise generally unreliable, so who knows? These are among the reasons we're switching away. Please use discourse.julialang.org – thanks!
Reply all
Reply to author
Forward
0 new messages