[plt-scheme] Listing all exported symbols/structures of a modul e/extension

From: Dmitriy Zavin (dmitriy.zavin at infineon.com)
Date: Sun Aug 29 00:47:12 EDT 2004

> At Thu, 26 Aug 2004 18:40:58 -0700, Dmitriy.Zavin at infineon.com wrote:
> > I am trying to implement a very slim RPC. The code on the remote end was
> > generated through SWIG. Thus its loaded at startup with
> > (load-extension).
> > What I need is a way to get a list of all procedures that are exported
> > by the extension at hand.
> 
> If the extension implements a module, then you can use
> `module->namespace' and then functions like `namespace-mapped-symbols'.
> 
> I don't have any other ideas, though, if the extension doesn't
> implement a module.
> 
> Matthew

When I try to do that, it lists ALL symbols visible by the namespace:
(parameterize ((current-namespace (module->namespace '(lib
"mymodule"))))
	(namespace-mapped-symbols))

What am i missing?

Thanks.

--Dima



Posted on the users mailing list.