mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 14:21:10 +02:00
(SCM_CHARS, SCM_UCHARS, SCM_LENGTH, scm_i_object_chars,
scm_i_object_length): Brought back from the dead.
This commit is contained in:
parent
3d8bccbd81
commit
a725fa951c
2 changed files with 36 additions and 0 deletions
|
@ -651,6 +651,33 @@ scm_strprint_obj (SCM obj)
|
||||||
return scm_object_to_string (obj, SCM_UNDEFINED);
|
return scm_object_to_string (obj, SCM_UNDEFINED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
scm_i_object_chars (SCM obj)
|
||||||
|
{
|
||||||
|
scm_c_issue_deprecation_warning
|
||||||
|
("SCM_CHARS is deprecated. See the manual for alternatives.");
|
||||||
|
if (SCM_STRINGP (obj))
|
||||||
|
return SCM_STRING_CHARS (obj);
|
||||||
|
if (SCM_SYMBOLP (obj))
|
||||||
|
return SCM_SYMBOL_CHARS (obj);
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
|
long
|
||||||
|
scm_i_object_length (SCM obj)
|
||||||
|
{
|
||||||
|
scm_c_issue_deprecation_warning
|
||||||
|
("SCM_LENGTH is deprecated. "
|
||||||
|
"Use scm_c_string_length instead, for example, or see the manual.");
|
||||||
|
if (SCM_STRINGP (obj))
|
||||||
|
return SCM_STRING_LENGTH (obj);
|
||||||
|
if (SCM_SYMBOLP (obj))
|
||||||
|
return SCM_SYMBOL_LENGTH (obj);
|
||||||
|
if (SCM_VECTORP (obj))
|
||||||
|
return SCM_VECTOR_LENGTH (obj);
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
|
|
||||||
SCM
|
SCM
|
||||||
scm_sym2ovcell_soft (SCM sym, SCM obarray)
|
scm_sym2ovcell_soft (SCM sym, SCM obarray)
|
||||||
{
|
{
|
||||||
|
|
|
@ -226,6 +226,15 @@ SCM_API SCM scm_strprint_obj (SCM obj);
|
||||||
SCM_API SCM scm_read_0str (char *expr);
|
SCM_API SCM scm_read_0str (char *expr);
|
||||||
SCM_API SCM scm_eval_0str (const char *expr);
|
SCM_API SCM scm_eval_0str (const char *expr);
|
||||||
|
|
||||||
|
SCM_API char *scm_i_object_chars (SCM);
|
||||||
|
|
||||||
|
#define SCM_CHARS(x) scm_i_object_chars(x)
|
||||||
|
#define SCM_UCHARS(x) ((unsigned char *)SCM_CHARS(x))
|
||||||
|
|
||||||
|
SCM_API long scm_i_object_length (SCM);
|
||||||
|
|
||||||
|
#define SCM_LENGTH(x) scm_i_object_length(x)
|
||||||
|
|
||||||
#define scm_strhash(str, len, n) (scm_string_hash ((str), (len)) % (n))
|
#define scm_strhash(str, len, n) (scm_string_hash ((str), (len)) % (n))
|
||||||
|
|
||||||
SCM_API SCM scm_sym2ovcell_soft (SCM sym, SCM obarray);
|
SCM_API SCM scm_sym2ovcell_soft (SCM sym, SCM obarray);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue