Use scm_gc_malloc/scm_malloc and scm_gc_free/free instead of
authorMarius Vollmer <mvo@zagadka.de>
Mon, 11 Feb 2002 18:09:15 +0000 (18:09 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Mon, 11 Feb 2002 18:09:15 +0000 (18:09 +0000)
scm_must_malloc and scm_must_free, as appropriate.

srfi/srfi-14.c
srfi/srfi-4.c

index 1f3abae..e16f233 100644 (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);
 }
index 9ecd8b1..c059707 100644 (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);
 }