mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 16:20:17 +02:00
* socket.c, rw.c, deprecated.h, validate.h
(SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or scm_to_locale_string, etc. (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as above, plus scm_i_get_substring_spec. * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c, hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first with more explicit scm_remember_upto_here_1, etc, or introduced them in the first place.
This commit is contained in:
parent
70f7ee4188
commit
8824ac88f0
18 changed files with 189 additions and 135 deletions
|
@ -63,12 +63,12 @@ SCM_DEFINE (scm_make_struct_layout, "make-struct-layout", 1, 0, 0,
|
|||
size_t len;
|
||||
int x;
|
||||
|
||||
len = SCM_STRING_LENGTH (fields);
|
||||
len = SCM_I_STRING_LENGTH (fields);
|
||||
if (len % 2 == 1)
|
||||
SCM_MISC_ERROR ("odd length field specification: ~S",
|
||||
scm_list_1 (fields));
|
||||
|
||||
field_desc = SCM_STRING_CHARS (fields);
|
||||
field_desc = SCM_I_STRING_CHARS (fields);
|
||||
|
||||
for (x = 0; x < len; x += 2)
|
||||
{
|
||||
|
@ -122,7 +122,8 @@ SCM_DEFINE (scm_make_struct_layout, "make-struct-layout", 1, 0, 0,
|
|||
}
|
||||
new_sym = scm_mem2symbol (field_desc, len);
|
||||
}
|
||||
return scm_return_first (new_sym, fields);
|
||||
scm_remember_upto_here_1 (fields);
|
||||
return new_sym;
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
@ -231,17 +232,22 @@ SCM_DEFINE (scm_struct_vtable_p, "struct-vtable?", 1, 0, 0,
|
|||
{
|
||||
SCM layout;
|
||||
scm_t_bits * mem;
|
||||
int tmp;
|
||||
|
||||
if (!SCM_STRUCTP (x))
|
||||
return SCM_BOOL_F;
|
||||
|
||||
layout = SCM_STRUCT_LAYOUT (x);
|
||||
|
||||
if (SCM_SYMBOL_LENGTH (layout) < SCM_STRING_LENGTH (required_vtable_fields))
|
||||
if (SCM_SYMBOL_LENGTH (layout)
|
||||
< SCM_I_STRING_LENGTH (required_vtable_fields))
|
||||
return SCM_BOOL_F;
|
||||
|
||||
if (strncmp (SCM_SYMBOL_CHARS (layout), SCM_STRING_CHARS (required_vtable_fields),
|
||||
SCM_STRING_LENGTH (required_vtable_fields)))
|
||||
tmp = strncmp (SCM_SYMBOL_CHARS (layout),
|
||||
SCM_I_STRING_CHARS (required_vtable_fields),
|
||||
SCM_I_STRING_LENGTH (required_vtable_fields));
|
||||
scm_remember_upto_here_1 (required_vtable_fields);
|
||||
if (tmp)
|
||||
return SCM_BOOL_F;
|
||||
|
||||
mem = SCM_STRUCT_DATA (x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue