diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-06-25 11:06:33 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2001-06-25 11:06:33 +0000 |
commit | 13dcb66612f195f93e6529a25aa21376215a89c6 (patch) | |
tree | 4421321f98a48a00279db6c55f1b836cb4fea36c /libguile/stacks.h | |
parent | 5f5dc9296639c2cea89c796ab11efa5cacb54a3c (diff) |
* Fix signedness plus some minor improvements.
Diffstat (limited to 'libguile/stacks.h')
-rw-r--r-- | libguile/stacks.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libguile/stacks.h b/libguile/stacks.h index b034bb368..58b83ff80 100644 --- a/libguile/stacks.h +++ b/libguile/stacks.h @@ -1,8 +1,8 @@ /* classes: h_files */ -#ifndef STACKSH -#define STACKSH -/* Copyright (C) 1995,1996, 2000 Free Software Foundation +#ifndef SCM_STACKS_H +#define SCM_STACKS_H +/* Copyright (C) 1995,1996,2000,2001 Free Software Foundation * * 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 @@ -84,10 +84,11 @@ extern SCM scm_t_stackype; #define SCM_STACKP(obj) (SCM_STRUCTP (obj) && SCM_EQ_P (SCM_STRUCT_VTABLE (obj), scm_t_stackype)) #define SCM_STACK_LENGTH(stack) (SCM_STACK (stack) -> length) -#define SCM_FRAMEP(obj) (SCM_CONSP (obj) \ - && SCM_STACKP (SCM_CAR (obj)) \ - && SCM_INUMP (SCM_CDR (obj))) \ - +#define SCM_FRAMEP(obj) \ + (SCM_CONSP (obj) && SCM_STACKP (SCM_CAR (obj)) \ + && SCM_INUMP (SCM_CDR (obj)) && SCM_INUM (SCM_CDR (obj)) >= 0 \ + && ((unsigned long int) SCM_INUM (SCM_CDR (obj)) \ + < SCM_STACK_LENGTH (SCM_CAR (obj)))) #define SCM_FRAME_REF(frame, slot) \ (SCM_STACK (SCM_CAR (frame)) -> frames[SCM_INUM (SCM_CDR (frame))].slot) \ @@ -142,7 +143,7 @@ SCM scm_frame_overflow_p (SCM frame); void scm_init_stacks (void); -#endif /* STACKSH */ +#endif /* SCM_STACKS_H */ /* Local Variables: |