allow for native mod functions to initialize records #1487
Labels
A-type-system
Area: Type system
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-hard
Call for participation: Hard difficulty. Experience needed to fix: A lot.
Some C libraries want you to create a structure on the stack and pass it off to be initialized by some function. Right now the typestate requires all structures to be fully defined before being passed to a function, so I'm finding myself having to write:
Since I'm passing raw pointers to c, it's naturally unsafe, so it'd be nice if we could allow
foo_t
to be opaque to the typestate system. What if we allow native module functions to have a flag saying they can initialize an uninitialized value? It'd help simplify binding to third party libraries.The text was updated successfully, but these errors were encountered: