mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-02 07:40:30 +02:00
Convert scm_gc_malloc* calls to scm_allocate*
* libguile/arrays.c: * libguile/bitvectors.c: * libguile/bytevectors.c: * libguile/chooks.c: * libguile/continuations.c: * libguile/control.c: * libguile/dynstack.c: * libguile/ephemerons.c: * libguile/filesys.c: * libguile/foreign.c: * libguile/fports.c: * libguile/frames.c: * libguile/gsubr.c: * libguile/hashtab.c: * libguile/i18n.c: * libguile/integers.c: * libguile/intrinsics.c: * libguile/load.c: * libguile/loader.c: * libguile/macros.c: * libguile/numbers.c: * libguile/options.c: * libguile/ports.c: * libguile/programs.h: * libguile/random.c: * libguile/read.c: * libguile/regex-posix.c: * libguile/smob.c: * libguile/srfi-14.c: * libguile/strings.c: * libguile/struct.c: * libguile/threads.c: * libguile/threads.h: * libguile/values.c: * libguile/vm.c: Convert all calls to scm_gc_malloc_pointerless to scm_allocate_pointerless. Convert scm_gc_malloc to either scm_allocate_tagged or scm_allocate_sloppy, depending on whether the value can be precisely traced or not.
This commit is contained in:
parent
290a57b1b0
commit
f2ad6525e6
35 changed files with 126 additions and 102 deletions
|
@ -137,8 +137,9 @@ make_stringbuf (size_t len)
|
|||
if (INT_ADD_OVERFLOW (len, STRINGBUF_HEADER_BYTES + 32))
|
||||
scm_num_overflow ("make_stringbuf");
|
||||
|
||||
buf = SCM_PACK_POINTER (scm_gc_malloc_pointerless (STRINGBUF_HEADER_BYTES + len + 1,
|
||||
"string"));
|
||||
buf = SCM_PACK_POINTER
|
||||
(scm_allocate_pointerless (SCM_I_CURRENT_THREAD,
|
||||
STRINGBUF_HEADER_BYTES + len + 1));
|
||||
|
||||
SCM_SET_CELL_TYPE (buf, STRINGBUF_TAG);
|
||||
SCM_SET_CELL_WORD_1 (buf, (scm_t_bits) len);
|
||||
|
@ -171,8 +172,9 @@ make_wide_stringbuf (size_t len)
|
|||
scm_num_overflow ("make_wide_stringbuf");
|
||||
|
||||
raw_len = (len + 1) * sizeof (scm_t_wchar);
|
||||
buf = SCM_PACK_POINTER (scm_gc_malloc_pointerless (STRINGBUF_HEADER_BYTES + raw_len,
|
||||
"string"));
|
||||
buf = SCM_PACK_POINTER
|
||||
(scm_allocate_pointerless (SCM_I_CURRENT_THREAD,
|
||||
STRINGBUF_HEADER_BYTES + raw_len));
|
||||
|
||||
SCM_SET_CELL_TYPE (buf, STRINGBUF_TAG | STRINGBUF_F_WIDE);
|
||||
SCM_SET_CELL_WORD_1 (buf, (scm_t_bits) len);
|
||||
|
@ -1499,7 +1501,7 @@ decoding_error (const char *func_name, int errno_save,
|
|||
SCM bv;
|
||||
signed char *buf;
|
||||
|
||||
buf = scm_gc_malloc_pointerless (len, "bytevector");
|
||||
buf = scm_allocate_pointerless (SCM_I_CURRENT_THREAD, len);
|
||||
memcpy (buf, str, len);
|
||||
bv = scm_c_take_gc_bytevector (buf, len, SCM_BOOL_F);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue