Hello, "Jose A. Ortega Ruiz" <j...@gnu.org> writes:
> When called on a program (procedure object) implemented in C, > program-module returns something that is not a module: > > (define cp (module-ref (current-module) 'cons)) > > (program? cp) => #t > (program-module cp) => #<pointer 0xb77ccbb0> > (module? (program-module cp)) => #f Apparently ‘program-module’ assumes that the first object in a program object table is the module in question, but that is no longer true: scheme@(guile-user)> (program-objects (lambda x x)) $56 = #f scheme@(guile-user)> (program-objects cons) $57 = #(#<pointer 0x7f2992042d60> cons) except for programs referring to global bindings: scheme@(guile-user)> (program-objects (lambda x getaddrinfo)) $60 = #(#<directory (guile-user) 109c090> getaddrinfo) Hmm ‘compile-assembly.scm’ has this ‘*module*’ variable, which seems to relate to this. Needs more investigation... Ludo’.