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

Functions returning functions that are exported to user space return pointers #2

Open
mattbasta opened this issue Apr 14, 2014 · 0 comments
Labels

Comments

@mattbasta
Copy link
Owner

There are a number of potential solutions:

  • Wrap all functions exposed to user space such that any exposed function returns the expected type. I.e.: functions that return functions will return closures, which are in turn wrapped to do the same. This would also apply to complex data structures.
  • Ban functions from returning any non-primitive values (very limiting)
  • Continue to return pointers and require user-space developers to use an abstraction API to interact with the values that are returned (a wrapper around the memory manager and heaps).

Note that this issue also presents itself to imported foreign functions (passing complex objects as arguments), though custom exposed methods are not currently available.

@mattbasta mattbasta added the bug label Apr 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant