guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile 1.4.1.97 available


From: Thien-Thi Nguyen
Subject: guile 1.4.1.97 available
Date: Wed, 19 Nov 2003 13:36:08 +0100

new NEWS excerpt below.  tarball in:

  http://www.glug.org/alt/

usual bugfixes and small improvements.  the big deal is modsup.h
integration (first two NEWS excerpt items).  here's a quick example:

  #include <guile/modsup.h>

  GH_USE_MODULES (mod_cl, "(ice-9 common-list)");
  GH_SELECT_MODULE_VAR (setdiff, mod_cl, "set-difference");
  GH_CALLER2_FROM_VAR (setdiff_proc, setdiff)

  GH_DEFPROC (yasd, "yet-another-set-difference", 2, 0, 0,
              (SCM ls1, SCM ls2), "thou art the less symbolic")
  { return setdiff_proc (ls1, ls2); }

  static void
  init_module (void)
  {
  #include "my-stuff.h"
  }

  GH_NEEDY_MODULE_LINK_FUNC
    ("my stuff", my_stuff, init_module,
     GH_UPSTREAM_MODULE_REFS1 (mod_cl))

the "guile-tools make-module-catalog" program now scans compiled
modules for special GH_USE_MODULES string artifacts, so that (in
this case) the generated entry includes upstream info:

  ...
  ((my stuff) scm_init_module "scm_init_my_stuff_module"
              ((ice-9 common-list))     ;; upstreams
              . "/tmp/a/b/c/lib/guile/site/my/stuff.0.0.0")
  ...

the module system machinery under `try-module-dynamic-link' then
arranges to resolve the interface of `(ice-9 common-list)' before
dlopening `(my stuff)'.  generated code for my-stuff.x sets C vars
`mod_cl' and `setdiff', as well as declares and defines static func
`setdiff_proc' (used by `yasd' in this example).

mutually-dependent modules are not currently supported (as far as i
know!), although that's something to look into if this works ok.

compiled modules may, of course, be written that do not depend on
other modules, in which case you would use the simpler construct:

  GH_MODULE_LINK_FUNC ("my stuff", my_stuff, init_module)

which expands to the traditional `scm_register_module_xxx'-calling
func.  the guile 1.4.1.97 distribution includes (and installs)
several examples of these independent compiled modules.  see info
node "Creating Guile Modules" for docs, and/or the module index.

thi


_____________________________________________________________
* New support for compiled modules using other modules

If module A uses module B, we call B the "upstream module" of A.  Guile now
supports the expression, dynamic loading, and custom interface selection of
upstream modules by a compiled module.  Upstreams can be any resolvable
Guile module that provides a public interface.  This is done by new C
function `scm_register_needy_module_xxx' with the help of several macros
supplied in <guile/modsup.h> (see NEWS entry below).

[Currently, if module A is the upstream of yet another module, say "C",
that module also sees those bindings imported from B.  This will be fixed
before 1.4.2 release and this notice removed.]

Note that although this facility builds upon libtool's "dlopenable
modules", it is really not the same thing; the expression of a compiled
module's upstreams is generally neither available to nor understood by
libtool.  Unfortunately, the word "module" is widely used for (surprise)
implementing modular programming support (modularly ;-).

* New installed header: guile/modsup.h

This provides several macros that support init and doc snarfing of
Scheme-visible C functions, as well as `scm_register_module_xxx'-style
and `scm_register_needy_module_xxx'-style dynamic linking and init.

See manual for more info, and source and makefiles for (database *) and
(srfi *) compiled modules for example usage.  Note that for guile's own
build, we use "libguile/modsup.h"; you should use "guile/modsup.h" instead.

* New configure option: --enable-htmldir=DIR

The distribution now includes documentation rendered into HTML in addition
to the usual info pages.  You can install this using the configure script
option `--enable-htmldir=DIR'.  By default it is not installed.

If DIR contains the string "guile", it is used directly as the installation
directory.  Otherwise, the installation directory is formed by concatenating
DIR with "/guile-VERSION", where VERSION is Guile's version number.

In both the distribution and installation directories, the file index.html
contains the root page of the documentation.

[excerpt ends here]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]