[plt-scheme] Using extensions

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Nov 12 21:31:01 EST 2006

At Wed, 08 Nov 2006 09:32:24 -0500, "Kevin A. Smith" wrote:
> mzscheme reports this error when the require statement is evaluated:
> 
> load-extension: expected module 'pltpgdb, but found module 'pltpgdb'
> 
> The error message confuses me since it seems to be finding the module
> it's expecting.
> 
> Any suggestions?

This puzzled me, too, but I finally got a chance to install SWIG.

SWIG generates

 Scheme_Object *scheme_module_name(void) {
   return scheme_make_symbol((char*)"pltpgdb");
 }

which is wrong, because scheme_make_symbol() doesn't intern the symbol.
In other words, it generates a symbol that prints the same as 'pltpgdb,
but it's not `eq?' to 'pltpgdb.

Change the output of SWIG to use scheme_intern_symbol(), instead.

Matthew



Posted on the users mailing list.