Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

at-cfunction doesn't work on local variable #27464

Closed
stevengj opened this issue Jun 6, 2018 · 2 comments
Closed

at-cfunction doesn't work on local variable #27464

stevengj opened this issue Jun 6, 2018 · 2 comments

Comments

@stevengj
Copy link
Member

stevengj commented Jun 6, 2018

let foo(x)=x+1, Foo=Int, bar() = @cfunction(foo, Foo, (Foo,)), ptr = bar()
    ptr
end

gives ERROR: UndefVarError: foo not defined. Encountered when testing JuliaLang/Compat.jl#566.

@vtjnash, is this the intended behavior?

@KristofferC
Copy link
Member

I thought you had to interpolate foo in this case.

@stevengj
Copy link
Member Author

stevengj commented Jun 6, 2018

Ah, I see that this is documented, thanks.

@stevengj stevengj closed this as completed Jun 6, 2018
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

No branches or pull requests

2 participants