mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
* 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.
This commit is contained in:
parent
1bee0e70ca
commit
c1aef03710
5 changed files with 17 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue