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

object->exact-type-retval used by ffi/define-foreign-interface doesn't support void return type #38

Closed
tristanstraub opened this issue Sep 15, 2021 · 2 comments

Comments

@tristanstraub
Copy link

(defn object->exact-type-retval

I tried defining the following but could not compile it due to the case not supporting "void":

(def comp-iface-def (ffi/define-foreign-interface :void [:int32 :pointer]))

Adding the following to "object->exact-type-retval" appears to work as expected, with the callback from c -> clojure happening without issues:

:void [[:return]]

@tristanstraub
Copy link
Author

I have used ":pointer?" as a return type to work around this. Is this the intent?

@cnuernber
Copy link
Owner

This is a real issue for sure. Void means nothing is popped off the C stack which is key to indicate. Thanks for the issue.

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