guile-cvs
[Top][All Lists]
Advanced

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

guile/guile-core/libguile struct.c


From: Marius Vollmer
Subject: guile/guile-core/libguile struct.c
Date: Sun, 29 Jul 2001 13:42:06 -0700

CVSROOT:        /cvs
Module name:    guile
Changes by:     Marius Vollmer <address@hidden> 01/07/29 13:42:06

Modified files:
        guile-core/libguile: struct.c 

Log message:
        (scm_struct_vtable_p): Do not check vcell slot for zero.  Use
        scm_vtable_index_layout instead of "0" when accessing said slot.
        (scm_init_struct): Remove vcell slot layout code from
        required_vtable_fields.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/struct.c.diff?cvsroot=OldCVS&tr1=1.83&tr2=1.84&r1=text&r2=text

Patches:
Index: guile/guile-core/libguile/struct.c
diff -u guile/guile-core/libguile/struct.c:1.83 
guile/guile-core/libguile/struct.c:1.84
--- guile/guile-core/libguile/struct.c:1.83     Thu Jul 26 14:40:17 2001
+++ guile/guile-core/libguile/struct.c  Sun Jul 29 13:42:06 2001
@@ -270,10 +270,7 @@
 
   mem = SCM_STRUCT_DATA (x);
 
-  if (mem[1] != 0)
-    return SCM_BOOL_F;
-
-  return SCM_BOOL (SCM_SYMBOLP (SCM_PACK (mem[0])));
+  return SCM_BOOL (SCM_SYMBOLP (SCM_PACK (mem[scm_vtable_index_layout])));
 }
 #undef FUNC_NAME
 
@@ -823,7 +820,7 @@
 {
   scm_struct_table
     = scm_permanent_object (scm_make_weak_key_hash_table (SCM_MAKINUM (31)));
-  required_vtable_fields = scm_makfrom0str ("pruosrpw");
+  required_vtable_fields = scm_makfrom0str ("prsrpw");
   scm_permanent_object (required_vtable_fields);
   scm_c_define ("vtable-index-layout", SCM_MAKINUM (scm_vtable_index_layout));
   scm_c_define ("vtable-index-vtable", SCM_MAKINUM (scm_vtable_index_vtable));



reply via email to

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