summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2000-09-22 16:44:42 +0000
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>2000-09-22 16:44:42 +0000
commitc1aef037101d36e33de853041e407593cf32a489 (patch)
treeb6c123d8e19c1065f7d23a05b12fba4611146f4c
parent1bee0e70ca1609dee342cec0c0bc304098faf983 (diff)
downloadguile-c1aef037101d36e33de853041e407593cf32a489.tar.gz
* Added SCM_STRING_CHARS and SCM_SYMBOL_CHARS in order to, in the long run,
get rid of SCM_CHARS, which is shared between a large number of types, and thus makes it difficult to change the implementation of a single type.
-rw-r--r--NEWS3
-rw-r--r--RELEASE2
-rw-r--r--libguile/ChangeLog10
-rw-r--r--libguile/strings.h5
-rw-r--r--libguile/symbols.h1
5 files changed, 17 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index f98a4b61c..d624d4a37 100644
--- a/NEWS
+++ b/NEWS
@@ -136,10 +136,11 @@ of this variable is (and has been) not fully safe anyway.
** Deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
-SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS
+SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SYMBOL_SLOTS, SCM_SLOTS, SCM_SLOPPY_STRINGP
Use SCM_ASSERT_RANGE or SCM_VALIDATE_XXX_RANGE instead of SCM_OUTOFRANGE.
Use scm_memory_error instead of SCM_NALLOC.
+Use SCM_STRINGP instead of SCM_SLOPPY_STRINGP.
** Removed function: scm_struct_init
diff --git a/RELEASE b/RELEASE
index ff52517db..5cf2ae6c9 100644
--- a/RELEASE
+++ b/RELEASE
@@ -50,7 +50,7 @@ In release 1.6:
- remove deprecated macros: SCM_OUTOFRANGE, SCM_NALLOC, SCM_HUP_SIGNAL,
SCM_INT_SIGNAL, SCM_FPE_SIGNAL, SCM_BUS_SIGNAL, SCM_SEGV_SIGNAL,
SCM_ALRM_SIGNAL, SCM_GC_SIGNAL, SCM_TICK_SIGNAL, SCM_SIG_ORD,
- SCM_ORD_SIG, SCM_NUM_SIGS
+ SCM_ORD_SIG, SCM_NUM_SIGS, SCM_SLOPPY_STRINGP
- remove function scm_call_catching_errors
(replaced by catch functions from throw.[ch])
- remove support for "#&" reader syntax in (ice-9 optargs).
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index 0d66d903e..8c3e6a1bd 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -1,3 +1,13 @@
+2000-09-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * strings.h (SCM_STRING_CHARS): Added, should be used instead of
+ SCM_CHARS whenever the argument is known to be a string.
+
+ (SCM_SLOPPY_STRINGP): Deprecated.
+
+ * symbols.h (SCM_SYMBOL_CHARS): Added, should be used instead of
+ SCM_CHARS whenever the argument is known to be a symbol.
+
2000-09-22 Neil Jerram <neil@ossau.uklinux.net>
* struct.c (scm_make_struct): Fix texinfo warning in docstring by
diff --git a/libguile/strings.h b/libguile/strings.h
index b56ab91f5..0d518d7e8 100644
--- a/libguile/strings.h
+++ b/libguile/strings.h
@@ -51,8 +51,8 @@
-#define SCM_SLOPPY_STRINGP(x) (SCM_TYP7S (x) == scm_tc7_string)
-#define SCM_STRINGP(x) (SCM_NIMP (x) && SCM_SLOPPY_STRINGP (x))
+#define SCM_STRINGP(x) (SCM_NIMP (x) && (SCM_TYP7S (x) == scm_tc7_string))
+#define SCM_STRING_CHARS(x) ((char *) (SCM_CELL_WORD_1 (x)))
/* Is X a writable string (i.e., not a substring)? */
#define SCM_RWSTRINGP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_string))
@@ -82,6 +82,7 @@ extern void scm_init_strings (void);
#if (SCM_DEBUG_DEPRECATED == 0)
+#define SCM_SLOPPY_STRINGP(x) (SCM_STRINGP(x))
#define SCM_NSTRINGP(x) (!SCM_STRINGP(x))
#define SCM_NRWSTRINGP(x) (! SCM_RWSTRINGP (x))
diff --git a/libguile/symbols.h b/libguile/symbols.h
index 72a83cdf7..bb654d200 100644
--- a/libguile/symbols.h
+++ b/libguile/symbols.h
@@ -57,6 +57,7 @@ extern int scm_symhash_dim;
*/
#define SCM_SYMBOLP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_symbol))
+#define SCM_SYMBOL_CHARS(x) ((char *) (SCM_CELL_WORD_1 (x)))
#define SCM_LENGTH_MAX (0xffffffL)
#define SCM_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)