Skip to content

Allow cdef declarations to be scoped to a namespace #52

@gynt

Description

@gynt

I have a use case where I provide a cffi interface to user scripts. Users can script in lua to access memory via struct definitions.
I am worried about name clashes as everything declared in cffi is global I think. I want my users' scripts to be able to use cdef independently of each other.

Possible solutions:

  • Force users to use anonymous struct declarations. Does cffi-lua support this?
  • Separate cdef namespaces for each user script. Does or can cffi-lua support this?
  • Enforce a naming convention so user scripts use a prefix to avoid name clashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions