This is the mail archive of the guile@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]

missing case in eval for cclo


There seems to be a missing case in the evaluator for compiled
closures.

Try the following:

    (eval (make-cclo #t #f))

This should give an error (I unfortunately does not have an unpatched
version of guile handy, but as I remember, the above expression
demonstrates the problem).

I have hit this problem in the context of compiling clos to C with
hobbit, which would turn init-form expressions into CCLOs which then
are eval'ed.

The patch most likely is relative to an older snapshot, but should
transfer to recent ones as well.

The following patch fixes the problem:


Index: tools/guile/guile-core/libguile/eval.c
diff -u tools/guile/guile-core/libguile/eval.c:1.1.1.2 tools/guile/guile-core/libguile/eval.c:1.1.1.2.8.1
--- tools/guile/guile-core/libguile/eval.c:1.1.1.2	Fri Jan 30 22:07:38 1998
+++ tools/guile/guile-core/libguile/eval.c	Fri Jul 10 11:57:44 1998
@@ -1941,6 +1941,9 @@
     case scm_tc7_substring:
     case scm_tc7_smob:
     case scm_tcs_closures:
+#ifdef CCLO
+    case scm_tc7_cclo:
+#endif
     case scm_tcs_subrs:
       RETURN (x);
 


---------------------------+--------------------------------------------------
Christian Lynbech          | Telebit Communications A/S                       
Fax:   +45 8628 8186       | Fabrik 11, DK-8260 Viby J
Phone: +45 8628 8177 + 28  | email: chl@tbit.dk --- URL: http://www.telebit.dk
---------------------------+--------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic@hal.com (Michael A. Petonic)