[Is there a set of applied patches against my snapshot
(ftp://ftp.cygnus.com/pub/lord/guile-ii.tar.gz, dated May 7?]
the problem:
(eq? :foo :foo) => #t
(eq? :foo :bar) => #f
(equal? :foo :foo) => #t
(equal? :foo :bar) => infinite loop
I'm just starting to work with guile, so I don't understand where all the
code is. But this seems like a harmless patch. My assumption is that
is if (scm_smobs[i].equalp == 0), then two smobs [small objects?] are equal?
iff they are eq? . Is this a correct interpretation?
Yes.
Here's the 1-line patch, which keeps the tc7_smob case from falling through
into the tc7_bvect case when scm_smobs[i].equalp == 0.
b.g.
--- scl.c.orig Sat Apr 29 23:21:12 1995
+++ scl.c Wed Jul 26 09:49:30 1995
@@ -846,6 +846,7 @@
int i = SMOBNUM(x);
if (!(i < scm_numsmob)) return BOOL_F;
if (scm_smobs[i].equalp) return (scm_smobs[i].equalp)(x, y);
+ else return BOOL_F;
}
case tc7_bvect: case tc7_uvect: case tc7_ivect:
case tc7_fvect: case tc7_cvect: case tc7_dvect:
Thanks for the patch. scm_tc16_array was uninitialized as well:
diff -c unif.c~ unif.c
*** unif.c~ Wed Apr 26 21:22:00 1995
--- unif.c Wed Jul 26 19:52:03 1995
***************
*** 37,43 ****
sizet fwrite ();
#endif
! long scm_tc16_array;
char scm_s_resizuve[] = "vector-set-length!";
SCM
--- 37,43 ----
sizet fwrite ();
#endif
! long scm_tc16_array = 0;
char scm_s_resizuve[] = "vector-set-length!";
SCM