On 6 Jun 2000, bernard URBAN wrote:

> Hum... ALL *.x files contain only a newline !!!
> ALL *.doc are void !!!

But, there's more to it:  I just discovered a similar problem when trying
to use the threads stuff.

Here's what I found:  In scm_make_gsubr, for a couple of parameter numbers
there exist special cases.  But, if none of these special cases is used, 
the following code is executed:
  scm_set_procedure_property_x (cclo, scm_sym_name, SCM_CAR (symcell));
But, scm_sym_name has to be initialized!  If it is not initialized, it is
0, and thus equal to all other uninitialized globals.

Thus, scm_init_gsubr has to be called _before_ the first snarfed header
file is executed.  Up to now this problem has not appeared yet, but in the
new threads.c, there is a function with 4 mandatory parameters, and this
is not one of the special cases.

Here is what I did:

       scm_weaks_prehistory (); /* Must come after scm_init_storage */
       scm_init_subr_table ();
       scm_init_root ();
+      scm_init_gsubr ();
 #ifdef USE_THREADS
-      scm_init_threads (base);
+      scm_init_threads (base);  /* Requires gsubr */
 #endif
-      start_stack (base);
-      scm_init_gsubr ();
+      start_stack (base);       /* Requires threads */
       scm_init_feature ();
       scm_init_alist ();
       scm_init_arbiters ();

The dependencies between the different packages can become quite messy.

Best regards
Dirk

Reply via email to