summaryrefslogtreecommitdiff
path: root/libguile/strings.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2001-11-25 15:21:07 +0000
committerMarius Vollmer <mvo@zagadka.de>2001-11-25 15:21:07 +0000
commit16d4699b6ba33685f1318636ffe4990c7db4fdc6 (patch)
treed0ef01a70571d77fb07e062e2f29344e33c29952 /libguile/strings.c
parentd3c0e81cc847b39537a2b2945d80de18bf8d5e89 (diff)
downloadguile-16d4699b6ba33685f1318636ffe4990c7db4fdc6.tar.gz
Replaced SCM_NEWCELL and SCM_NEWCELL2 with scm_alloc_cell and
scm_alloc_double_cell, respectively.
Diffstat (limited to 'libguile/strings.c')
-rw-r--r--libguile/strings.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libguile/strings.c b/libguile/strings.c
index 8bd7de872..680707261 100644
--- a/libguile/strings.c
+++ b/libguile/strings.c
@@ -132,9 +132,7 @@ scm_take_str (char *s, size_t len)
SCM_ASSERT_RANGE (2, scm_ulong2num (len), len <= SCM_STRING_MAX_LENGTH);
- SCM_NEWCELL (answer);
- SCM_SET_STRING_CHARS (answer, s);
- SCM_SET_STRING_LENGTH (answer, len);
+ answer = scm_alloc_cell (SCM_MAKE_STRING_TAG (len), (scm_t_bits) s);
scm_done_malloc (len + 1);
return answer;
@@ -196,9 +194,7 @@ scm_allocate_string (size_t len)
mem = (char *) scm_must_malloc (len + 1, FUNC_NAME);
mem[len] = 0;
- SCM_NEWCELL (s);
- SCM_SET_STRING_CHARS (s, mem);
- SCM_SET_STRING_LENGTH (s, len);
+ s = scm_alloc_cell (SCM_MAKE_STRING_TAG (len), (scm_t_bits) mem);
return s;
}