Skip to content

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

Description

@mattbasta

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions