Original bug ID: 7173
Reporter: goswin
Status: closed (set by @mshinwell on 2016-12-08T13:31:18Z)
Resolution: duplicate
Priority: normal
Severity: feature
Version: 4.02.3
Category: runtime system and C interface
Monitored by: @gasche bobot @hcarty
Bug description
At the moment it is impossible to access a Weak.t from a C stub in a proper manner because the memory layout of Weak.t is undocumented and there are not accessor functions being exported. Current behaviour even departs from what is documented in the wild.
Complicating things it seems that with 4.03 the memory layout of Weak.t changes, moving all items down one index to make room for the ephemeral field or something. Every C stub using a Weak.t will have to be fixed. Now would be the right time to provide accessor functions to people can access Weak.t properly in the future.