[plt-scheme] Listing all exported symbols/structures of a modul e/extension
On Aug 29, Matthew Flatt wrote:
>
> For a module that is implemented as an extension, I get only the
> module's definitions/exports:
>
> localhost.localdomain% mzscheme -L mzssl.ss openssl
> Welcome to MzScheme version 299.14, Copyright (c) 2004 PLT Scheme, Inc.
> > (parameterize ([current-namespace (module->namespace '(lib "mzssl.ss"
> "openssl"))]) (namespace-mapped-symbols))
> (ssl-close ssl-listen ssl-make-context ssl-connect ssl-accept/enable-break
> ssl-make-client-context ssl-load-certificate-chain! ssl-client-context?
> ssl-available? ssl-connect/enable-break ssl-load-private-key!
> ssl-load-suggested-certificate-authorities! ssl-addresses ssl-accept
> ssl-load-verify-root-certificates! ssl-set-verify! ssl-listener?)
>
> I thought that would be the case for SWIG-built modules, too.
The versions of SWIG that I've played with look like they mess up the
module thing, which might cause such problems. The offending code
that I've seen it generate is:
Scheme_Object *scheme_reload(Scheme_Env *env) {
Scheme_Env *menv = env;
SWIG_RegisterTypes(swig_types, swig_types_initial);
scheme_add_global(..., menv);
return scheme_void;
}
Scheme_Object *scheme_initialize(Scheme_Env *env) {
return scheme_reload(env);
}
Scheme_Object *scheme_module_name(void) {
return scheme_make_symbol((char*)"foo");
}
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!