This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Guile: Still need to be the "Main" in "main()"???


> Guile runs as the "main" program, i.e. you call scm_boot_guile() 
> from main(), and scm_boot_guile() in turn calls another function. 
> This other function is what would've been main() had you not used 
> Guile.  So that part is true. However, it is only done this way 
> to simplify garbage collection.
> 

Okay -- so this is really not a big issue for many cases.  Except,
what I am doing is writing an add-on module to another program.
So I don't have control over "main" at all.  Let me be a bit more
specific.

I have an existing web server for which I wish to create a Scheme
extension module.  This module will be loaded by the web server if
certain configuration directives are present in a config file.

I do not wish to modify the main executable for the web server, so
that people can build the extension and use it without having to
change (or even have) the source for the main executable.  This
is consistent with other modules.

Now, what I could do (perhaps) is have the method that loads my
module call scm_boot_guile(), which could then call another method
that would finish the module initialization process.  From then
on, Scheme would be available to the extension.  Does that sound
reasonable?

Thanks,

-Brent

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]