summaryrefslogtreecommitdiff
path: root/libguile
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>2000-03-11 15:10:16 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>2000-03-11 15:10:16 +0000
commita54367e2da2c8c16048a8979e7095fc602135e92 (patch)
tree270fa0886551ee4c3af2d5880d800fe18834627e /libguile
parent9374451b7ea211b27b122456c4a4f0568b721c49 (diff)
downloadguile-a54367e2da2c8c16048a8979e7095fc602135e92.tar.gz
* objects.h (SCM_CLASS_FLAGS, SCM_OBJ_CLASS_FLAGS,
SCM_SET_CLASS_INSTANCE_SIZE), struct.h (SCM_STRUCT_VTABLE_DATA), proc.h (SCM_CLOSCAR): SCM_ASSCM/WORD fixes.
Diffstat (limited to 'libguile')
-rw-r--r--libguile/objects.h11
-rw-r--r--libguile/procs.h15
-rw-r--r--libguile/struct.h4
3 files changed, 17 insertions, 13 deletions
diff --git a/libguile/objects.h b/libguile/objects.h
index a443e7cde..4b19275bd 100644
--- a/libguile/objects.h
+++ b/libguile/objects.h
@@ -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
@@ -67,9 +67,10 @@
* 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}
*
diff --git a/libguile/procs.h b/libguile/procs.h
index 4721884ce..54401a6a8 100644
--- a/libguile/procs.h
+++ b/libguile/procs.h
@@ -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))))
diff --git a/libguile/struct.h b/libguile/struct.h
index 38b7c9235..d3c388d83 100644
--- a/libguile/struct.h
+++ b/libguile/struct.h
@@ -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])