* objects.h (SCM_CLASS_FLAGS, SCM_OBJ_CLASS_FLAGS,
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Sat, 11 Mar 2000 15:10:16 +0000 (15:10 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Sat, 11 Mar 2000 15:10:16 +0000 (15:10 +0000)
SCM_SET_CLASS_INSTANCE_SIZE), struct.h (SCM_STRUCT_VTABLE_DATA),
proc.h (SCM_CLOSCAR): SCM_ASSCM/WORD fixes.

libguile/objects.h
libguile/procs.h
libguile/struct.h

index a443e7c..4b19275 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef OBJECTSH
 #define OBJECTSH
 
-/*     Copyright (C) 1996, 1999 Free Software Foundation, Inc.
+/*     Copyright (C) 1996, 1999, 2000 Free Software Foundation, Inc.
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * certain class or its subclasses when traversal of the inheritance
  * graph would be too costly.
  */
-#define SCM_CLASS_FLAGS(class) SCM_ASWORD(SCM_STRUCT_DATA (class)[scm_struct_i_flags])
+#define SCM_CLASS_FLAGS(class)\
+        SCM_ASWORD (SCM_STRUCT_DATA (class)[scm_struct_i_flags])
 #define SCM_OBJ_CLASS_FLAGS(obj)\
-       SCM_ASWORD(SCM_STRUCT_VTABLE_DATA (obj)[scm_struct_i_flags])
+       SCM_ASWORD (SCM_STRUCT_VTABLE_DATA (obj)[scm_struct_i_flags])
 #define SCM_SET_CLASS_FLAGS(c, f) (SCM_CLASS_FLAGS (c) |= (f))
 #define SCM_CLEAR_CLASS_FLAGS(c, f) (SCM_CLASS_FLAGS (c) &= ~(f))
 #define SCM_CLASSF_MASK SCM_STRUCTF_MASK
@@ -97,7 +98,9 @@
 #define SCM_SET_CLASS_DESTRUCTOR(c, d) SCM_SET_VTABLE_DESTRUCTOR (c, d)
 #define SCM_SET_CLASS_INSTANCE_SIZE(c, s) \
 (SCM_STRUCT_DATA (c)[scm_struct_i_size] \
- = (SCM_STRUCT_DATA (c)[scm_struct_i_size] & SCM_STRUCTF_MASK) | s)
+ = SCM_ASSCM ((SCM_ASWORD (SCM_STRUCT_DATA (c)[scm_struct_i_size])\
+               & SCM_STRUCTF_MASK)\
+              | s))
 
 /* {Operator classes}
  *
index 4721884..54401a6 100644 (file)
@@ -2,7 +2,7 @@
 
 #ifndef PROCSH
 #define PROCSH
-/*     Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+/*     Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -100,12 +100,13 @@ typedef struct
 /* Closures
  */
 
-#define SCM_CLOSUREP(x) (SCM_NIMP(x) && (SCM_TYP3(x)==scm_tc3_closure))
-#define SCM_CLOSCAR(x) (SCM_CAR(x)-scm_tc3_closure)
-#define SCM_CODE(x) SCM_CAR(SCM_CLOSCAR (x))
-#define SCM_PROCPROPS(x) SCM_CDR(SCM_CLOSCAR (x))
-#define SCM_SETPROCPROPS(x, p) SCM_SETCDR(SCM_CLOSCAR (x), p)
-#define SCM_SETCODE(x, e) (SCM_SETCAR (x, scm_cons ((e), SCM_EOL) + scm_tc3_closure))
+#define SCM_CLOSUREP(x) (SCM_NIMP(x) && (SCM_TYP3 (x) == scm_tc3_closure))
+#define SCM_CLOSCAR(x) SCM_ASSCM (SCM_CARW (x) - scm_tc3_closure)
+#define SCM_CODE(x) SCM_CAR (SCM_CLOSCAR (x))
+#define SCM_PROCPROPS(x) SCM_CDR (SCM_CLOSCAR (x))
+#define SCM_SETPROCPROPS(x, p) SCM_SETCDR (SCM_CLOSCAR (x), p)
+#define SCM_SETCODE(x, e) (SCM_SETCAR (x, scm_cons ((e), SCM_EOL)\
+                           + scm_tc3_closure))
 #define SCM_ENV(x) SCM_CDR(x)
 #define SCM_SETENV(x, e) SCM_SETCDR (x, e)
 #define SCM_TOP_LEVEL(SCM_ENV)  (SCM_NULLP(SCM_ENV) || (SCM_BOOL_T == scm_procedure_p (SCM_CAR (SCM_ENV))))
index 38b7c92..d3c388d 100644 (file)
@@ -2,7 +2,7 @@
 
 #ifndef STRUCTH
 #define STRUCTH
-/*     Copyright (C) 1995, 1997, 1999 Free Software Foundation, Inc.
+/*     Copyright (C) 1995, 1997, 1999, 2000 Free Software Foundation, Inc.
  * 
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -79,7 +79,7 @@ typedef scm_sizet (*scm_struct_free_t) (SCM *vtable, SCM *data);
 
 #define SCM_STRUCTP(X)                 (SCM_NIMP(X) && (SCM_TYP3(X) == scm_tc3_cons_gloc))
 #define SCM_STRUCT_DATA(X)             ((SCM*)(SCM_CDR(X)))
-#define SCM_STRUCT_VTABLE_DATA(X)      ((SCM *)(SCM_CAR(X) - 1))
+#define SCM_STRUCT_VTABLE_DATA(X)      ((SCM *)(SCM_ASWORD (SCM_CAR(X)) - 1))
 #define SCM_STRUCT_LAYOUT(X)           (SCM_STRUCT_VTABLE_DATA(X)[scm_vtable_index_layout])
 #define SCM_STRUCT_VTABLE(X)           (SCM_STRUCT_VTABLE_DATA(X)[scm_vtable_index_vtable])
 #define SCM_STRUCT_PRINTER(X)          (SCM_STRUCT_VTABLE_DATA(X)[scm_vtable_index_printer])