Skip to content

Conversation

@josemanuel22
Copy link
Contributor

fix #42712

@Seelengrab
Copy link
Contributor

Since @KristofferC mentioned the possibility of getting rid of @ccallable in PackageCompiler, should this docstring mention julia apps at all?

What are the other/common uses for @ccallable - presumably an embedded context?

@KristofferC
Copy link
Member

Since @KristofferC mentioned the possibility of getting rid of @ccallable in PackageCompiler, should this docstring mention julia apps at all?

That's actually only for "apps". For libraries, it will still be needed. So would indeed be good to get this documented.

base/c.jl Outdated
"""
@ccallable(def)
Julia app with `ccallable` entry-point means that the respective Julia function can be called directly from C
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "Julia app"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this description is a bit too PackageCompiler specific. I would suggest something like:

@ccallable

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.

Or something along those lines...

@vtjnash vtjnash merged commit 110068f into JuliaLang:master Nov 10, 2021
@josemanuel22 josemanuel22 deleted the documentation_base_ccallable branch November 11, 2021 08:37
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document @ccallable?

5 participants