diff options
author | Jim Blandy <jimb@red-bean.com> | 1997-10-25 06:53:47 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1997-10-25 06:53:47 +0000 |
commit | c2cb25006b0c7d27e367c3a263295f6437f6d14e (patch) | |
tree | ac66ff8275580d29b1b39e19db94b5b4b8e12bff /libguile/symbols.h | |
parent | 01cddfc1e8080eef7d9f277d8d666fa2e56de825 (diff) | |
download | guile-c2cb25006b0c7d27e367c3a263295f6437f6d14e.tar.gz |
Minor problems with substring-related tag changes.
* symbols.h (SCM_SUBSTRP): Don't mask off the S bit; that's
exactly what we want to leave in to detect substrings.
(SCM_ROSTRINGP, ROUCHARS): Formatting tweaks.
* tags.h: Fix diagrams and comments describing the S tag bit;
remove vestigial remarks about the D tag bit.
(SCM_TYP7, SCM_TYP7S): Rephrased for readability.
* strings.c: Formatting tweaks.
Diffstat (limited to 'libguile/symbols.h')
-rw-r--r-- | libguile/symbols.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libguile/symbols.h b/libguile/symbols.h index 6f335c2c5..e154eb0d0 100644 --- a/libguile/symbols.h +++ b/libguile/symbols.h @@ -86,15 +86,16 @@ extern int scm_symhash_dim; #define SCM_SYMBOL_PROPS(X) (SCM_SLOTS(X)[1]) #define SCM_SYMBOL_HASH(X) (*(unsigned long*)(&SCM_SLOTS(X)[2])) -#define SCM_ROSTRINGP(x) ((SCM_TYP7S(x)==scm_tc7_string) || (SCM_TYP7S(x) == scm_tc7_ssymbol)) +#define SCM_ROSTRINGP(x) ((SCM_TYP7S(x)==scm_tc7_string) \ + || (SCM_TYP7S(x) == scm_tc7_ssymbol)) #define SCM_ROCHARS(x) ((SCM_TYP7(x) == scm_tc7_substring) \ ? SCM_INUM (SCM_CADR (x)) + SCM_CHARS (SCM_CDDR (x)) \ : SCM_CHARS (x)) #define SCM_ROUCHARS(x) ((SCM_TYP7(x) == scm_tc7_substring) \ - ? SCM_INUM (SCM_CADR (x)) + SCM_UCHARS (SCM_CDDR (x)) \ + ? SCM_INUM (SCM_CADR (x)) + SCM_UCHARS (SCM_CDDR (x))\ : SCM_UCHARS (x)) #define SCM_ROLENGTH(x) SCM_LENGTH (x) -#define SCM_SUBSTRP(x) ((SCM_TYP7S(x) == scm_tc7_substring)) +#define SCM_SUBSTRP(x) ((SCM_TYP7(x) == scm_tc7_substring)) #define SCM_SUBSTR_STR(x) (SCM_CDDR (x)) #define SCM_SUBSTR_OFFSET(x) (SCM_CADR (x)) |