SCM_VECTOR_BASE, SCM_UVECTOR_BASE, SCM_BITVECTOR_BASE, SCM_COMPLEX_MEM,
SCM_ARRAY_MEM
-Use these instead of SCM_CHARS or SCM_VELTS.
+Use these instead of SCM_CHARS, SCM_UCHARS, SCM_ROCHARS, SCM_ROUCHARS or
+SCM_VELTS.
** New macros: SCM_SET_BIGNUM_BASE, SCM_SET_STRING_CHARS,
SCM_SET_SYMBOL_CHARS, SCM_SET_UVECTOR_BASE, SCM_SET_BITVECTOR_BASE,
+2000-11-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * struct.c (scm_struct_ref, scm_struct_set_x), symbols.c
+ (scm_intern_obarray_soft), symbols.h (SCM_ROUCHARS): Eliminate
+ use of SCM_SYMBOL_UCHARS by using chars instead of unsigned
+ chars.
+
+ (SCM_SYMBOL_UCHARS): Removed.
+
2000-11-26 Gary Houston <ghouston@arglist.com>
* reimplementation of values, call-with-values as primitives:
SCM layout;
int p;
scm_bits_t n_fields;
- unsigned char * fields_desc;
- unsigned char field_type = 0;
+ char * fields_desc;
+ char field_type = 0;
SCM_VALIDATE_STRUCT (1,handle);
data = SCM_STRUCT_DATA (handle);
p = SCM_INUM (pos);
- fields_desc = SCM_SYMBOL_UCHARS (layout);
+ fields_desc = SCM_SYMBOL_CHARS (layout);
n_fields = data[scm_struct_i_n_words];
SCM_ASSERT_RANGE(1,pos, p < n_fields);
if (p * 2 < SCM_SYMBOL_LENGTH (layout))
{
- unsigned char ref;
+ char ref;
field_type = fields_desc[p * 2];
ref = fields_desc[p * 2 + 1];
if ((ref != 'r') && (ref != 'w'))
SCM layout;
int p;
int n_fields;
- unsigned char * fields_desc;
- unsigned char field_type = 0;
+ char * fields_desc;
+ char field_type = 0;
SCM_VALIDATE_STRUCT (1,handle);
SCM_VALIDATE_INUM (2,pos);
data = SCM_STRUCT_DATA (handle);
p = SCM_INUM (pos);
- fields_desc = SCM_SYMBOL_UCHARS (layout);
+ fields_desc = SCM_SYMBOL_CHARS (layout);
n_fields = data[scm_struct_i_n_words];
SCM_ASSERT_RANGE (1,pos, p < n_fields);
if (p * 2 < SCM_SYMBOL_LENGTH (layout))
{
- unsigned char set_x;
+ char set_x;
field_type = fields_desc[p * 2];
set_x = fields_desc [p * 2 + 1];
if (set_x != 'w')
scm_sizet i;
SCM a = SCM_CAR (lsym);
SCM z = SCM_CAR (a);
- unsigned char *tmp = SCM_SYMBOL_UCHARS (z);
+ char *tmp = SCM_SYMBOL_CHARS (z);
if (SCM_SYMBOL_HASH (z) != raw_hash)
goto trynext;
if (SCM_SYMBOL_LENGTH (z) != len)
goto trynext;
for (i = len; i--;)
- if (((unsigned char *) name)[i] != tmp[i])
+ if (name[i] != tmp[i])
goto trynext;
{
SCM_REALLOW_INTS;
* SCM_SYMBOL_CHARS(SYM) is the address of the first character of SYM's name.
*/
-#define SCM_SYMBOLP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_symbol))
-#define SCM_SYMBOL_UCHARS(x) ((unsigned char *) (SCM_CELL_WORD_1 (x)))
-#define SCM_SYMBOL_CHARS(x) ((char *) (SCM_CELL_WORD_1 (x)))
-#define SCM_SET_SYMBOL_CHARS(s, c) (SCM_SET_CELL_WORD_1 ((s), (c)))
-#define SCM_SYMBOL_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
+#define SCM_SYMBOLP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_symbol))
+#define SCM_SYMBOL_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
#define SCM_SET_SYMBOL_LENGTH(s, l) (SCM_SET_CELL_WORD_0 ((s), ((l) << 8) + scm_tc7_symbol))
+#define SCM_SYMBOL_CHARS(x) ((char *) (SCM_CELL_WORD_1 (x)))
+#define SCM_SET_SYMBOL_CHARS(s, c) (SCM_SET_CELL_WORD_1 ((s), (c)))
+#define SCM_SYMBOL_HASH(X) ((unsigned long) SCM_CELL_WORD_2 (X))
+#define SCM_SET_SYMBOL_HASH(X, v) (SCM_SET_CELL_WORD_2 ((X), (v)))
#define SCM_PROP_SLOTS(X) (SCM_CELL_WORD_3 (X))
#define SCM_SET_PROP_SLOTS(X, v) (SCM_SET_CELL_WORD_3 ((X), (v)))
#define SCM_SET_SYMBOL_FUNC(X, v) (SCM_SETCAR (SCM_CELL_WORD_3 (X), (v)))
#define SCM_SYMBOL_PROPS(X) (SCM_CDR (SCM_CELL_WORD_3 (X)))
#define SCM_SET_SYMBOL_PROPS(X, v) (SCM_SETCDR (SCM_CELL_WORD_3 (X), (v)))
-#define SCM_SYMBOL_HASH(X) (SCM_CELL_WORD_2 (X))
-#define SCM_SET_SYMBOL_HASH(X, v) (SCM_SET_CELL_WORD_2 ((X), (v)))
\f
? (SCM_INUM (SCM_CADR (x)) + SCM_STRING_UCHARS (SCM_CDDR (x))) \
: ((SCM_TYP7 (x) == scm_tc7_string) \
? SCM_STRING_UCHARS (x) \
- : SCM_SYMBOL_UCHARS (x)))
+ : (unsigned char *) SCM_SYMBOL_CHARS (x)))
#define SCM_SUBSTRP(x) (SCM_NIMP (x) && (SCM_TYP7 (x) == scm_tc7_substring))
#define SCM_COERCE_SUBSTR(x) SCM_STRING_COERCE_0TERMINATION_X (x)
#define scm_strhash(str, len, n) (scm_string_hash ((str), (len)) % (n))