guile-user
[Top][All Lists]
Advanced

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

Re: statically linking in srfi modules


From: Mark H Weaver
Subject: Re: statically linking in srfi modules
Date: Sat, 09 Feb 2013 21:00:59 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi Richard,

Don't worry, we'll get it working.  Here's another attempt.
Replace the calls to 'scm_c_register_extension' with the following:

  scm_c_call_with_current_module (scm_c_resolve_module ("guile"),
                                  bind_srfi_initializers, NULL);

With the following additional definitions:

  static SCM
  init_srfi_1 (void)
  {
    scm_init_srfi_1 ();
    return SCM_UNSPECIFIED;
  }

  static SCM
  init_srfi_60 (void)
  {
    scm_init_srfi_60 ();
    return SCM_UNSPECIFIED;
  }

  static SCM
  bind_srfi_initializers (void *dummy)
  {
    scm_c_define_gsubr ("%init-srfi-1",  0, 0, 0, init_srfi_1);
    scm_c_define_gsubr ("%init-srfi-60", 0, 0, 0, init_srfi_60);
    return SCM_UNSPECIFIED;
  }

Then, starting with the original versions of srfi-1.scm and srfi-60.scm
from Guile 1.8, replace the (load-extension ...) calls in those two
files with (%init-srfi-1) and (%init-srfi-60), respectively.

   *crosses fingers*
         Mark



reply via email to

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