diff options
author | Greg J. Badros <gjb@cs.washington.edu> | 1999-12-16 03:46:42 +0000 |
---|---|---|
committer | Greg J. Badros <gjb@cs.washington.edu> | 1999-12-16 03:46:42 +0000 |
commit | d3a6bc94840464e1af8109de5dddd5859560c679 (patch) | |
tree | 87475ee6d125df4493b89e5e6a9a13933c8ab356 /libguile/stacks.h | |
parent | f353a9e2323b3957cd8475bcf10f7b489a8ce000 (diff) | |
download | guile-d3a6bc94840464e1af8109de5dddd5859560c679.tar.gz |
* *.h: Use SCM_NIMP(X) && in all the FOOP macros.
* *.[ch]: Use do { ... } while (0) idiom in macros that expanded
to a bare block.
Diffstat (limited to 'libguile/stacks.h')
-rw-r--r-- | libguile/stacks.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libguile/stacks.h b/libguile/stacks.h index f92fa9a94..246e15183 100644 --- a/libguile/stacks.h +++ b/libguile/stacks.h @@ -45,6 +45,9 @@ * * The author can be reached at djurfeldt@nada.kth.se * Mikael Djurfeldt, SANS/NADA KTH, 10044 STOCKHOLM, SWEDEN */ + +/* Software engineering face-lift by Greg J. Badros, 11-Dec-1999, + gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */ #include "libguile/__scm.h" @@ -72,11 +75,11 @@ typedef struct scm_stack { extern SCM scm_stack_type; -#define SCM_STACKP(obj) (SCM_STRUCTP (obj) && SCM_STRUCT_VTABLE (obj) == scm_stack_type) +#define SCM_STACKP(obj) (SCM_NIMP(obj) && \ + SCM_STRUCTP (obj) && SCM_STRUCT_VTABLE (obj) == scm_stack_type) #define SCM_STACK_LENGTH(stack) (SCM_STACK (stack) -> length) #define SCM_FRAMEP(obj) (SCM_CONSP (obj) \ - && SCM_NIMP (SCM_CAR (obj)) \ && SCM_STACKP (SCM_CAR (obj)) \ && SCM_INUMP (SCM_CDR (obj))) \ |