1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 20:30:28 +02:00

Use scm_gc_malloc/scm_malloc and scm_gc_free/free instead of

scm_must_malloc and scm_must_free, as appropriate.
This commit is contained in:
Marius Vollmer 2002-02-11 18:09:15 +00:00
parent 4c9419ac31
commit 6c70aef189
2 changed files with 6 additions and 4 deletions

View file

@ -99,7 +99,7 @@ make_char_set (const char * func_name)
{
long * p;
p = scm_must_malloc (BYTES_PER_CHARSET, func_name);
p = scm_gc_malloc (BYTES_PER_CHARSET, "character-set");
memset (p, 0, BYTES_PER_CHARSET);
SCM_RETURN_NEWSMOB (scm_tc16_charset, p);
}

View file

@ -346,8 +346,10 @@ uvec_print (SCM uvec, SCM port, scm_print_state *pstate SCM_UNUSED)
static size_t
uvec_free (SCM uvec)
{
scm_must_free (SCM_UVEC_BASE (uvec));
return SCM_UVEC_LENGTH (uvec) * uvec_sizes[SCM_UVEC_TYPE (uvec)];
scm_gc_free (SCM_UVEC_BASE (uvec),
SCM_UVEC_LENGTH (uvec) * uvec_sizes[SCM_UVEC_TYPE (uvec)],
"uvec");
return 0;
}
@ -363,7 +365,7 @@ make_uvec (const char * func_name, int type, int len)
{
void * p;
p = scm_must_malloc (len * uvec_sizes[type], func_name);
p = scm_gc_malloc (len * uvec_sizes[type], "uvec");
SCM_RETURN_NEWSMOB3 (scm_tc16_uvec, type, len, p);
}