</pre>
<blockquote type="cite">
<pre wrap="">I'm trying to backport working FFI code to 5.1.3, and I'm having trouble referring to elements of a C struct. Specifically, in the presence of this definition

in 5.1.3, but it works just fine in the git head.
</pre>
</blockquote>
<pre wrap="">
More research suggests that the problem is more limited; it looks like a problem of generativity. That is, if I have two modules that declare the "same" cstruct (same name, same fields, same types) then cpointers to these structures returned by functions from the first module cannot be accessed in the other module.</pre>
</blockquote>
<br>
in 5.1.3 "same" cstructs defined in two different modules could not
inter-operate.<br>
Each place has it own copy of modules, so <br>
the "same" cstruct defined in the same module but in two different
places wouldn't inter-operate either.<br>
Hence the change.<br>
<pre wrap="">

AFAICT, This is not the case in more recent versions; that is, these cstructs are not generative. Assuming this is deliberate, I could document it.</pre>
This is deliberate. It allows foreign pointers to be shared between
places.<br>
<br>
The following text was removed from the documentation in the head
version because cstructs are not generative anymore.<br>
<br>
Note that tags are compared with @racket[eq?] (or @racket[memq]),
which means<br>
an interface can hide its value from users (e.g., not provide the<br>
@racket[cpointer-tag] accessor), which makes such pointers
un-fake-able.<br>
<br>
If you would like document the fact that cstructs are generative
only up to version 5.1.3. I think that improve the docs.<br>
Thanks,<br>
<br>
Kevin<br>
<blockquote
cite="mid:2F94A8F5-7D64-4E20-A34B-65789A4BC479@brinckerhoff.org"
type="cite">
<pre wrap="">