Closed swatson555 closed 2 years ago
I've updated the title because it doesn't matter whether load-shared-object
is called inside or outside a library definition.
Thanks for the report!
Can you provide a more complete example? I don't know what might be different, exception possible something related to cross-library inlining, and I'm not able to replicate a problem.
I think (* void)
isn't allowed as a return type in either the original Chez Scheme branch or the Racket one, so I wonder whether I'm misunderstanding something around that part.
It looks like this has been fixed in a recent version of Racket Chez.
Scheme libraries that export foreign procedures can't find their foreign code. In the original variant of Chez it was possible to do the following:
so that the foreign procedure would be in
bar
and would be exported when imported into a different location.Currently this doesn't work in the Racket variant and there aren't any practical workarounds. In the Racket variant trying to import this would result in everything exported from the library producing an exception that the foreign code has no entry. This includes trying to get the value of unrelated variables in the library. Calling
foreign-entry?
and checking if the code is there still works fine inside libraries.