What is the ccallable macro for in Julia?

Viewed 149

I have recently seen that there is a macro defined in base/c.jl called ccallable, but it is not clear to me what its usefulness is. It seems to be undocumented.

1 Answers

After reading the documentation a little more carefully, I would summarise the usefulness of this macro as follows:

Make the annotated function be callable from C using its name. This can, for example, be used to expose functionality as a C-API when creating a custom Julia sysimage.

Related