* gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Change
argument and return types.
* gc.h: Corresponding changes to prototypes.
(Thanks to Forcer.)
*
* The limit scm_mtrigger may be raised by this allocation.
*/
*
* The limit scm_mtrigger may be raised by this allocation.
*/
scm_must_malloc (scm_sizet size, const char *what)
{
scm_must_malloc (scm_sizet size, const char *what)
{
unsigned long nm = scm_mallocated + size;
if (nm <= scm_mtrigger)
{
unsigned long nm = scm_mallocated + size;
if (nm <= scm_mtrigger)
{
- SCM_SYSCALL (ptr = (char *) malloc (size));
+ SCM_SYSCALL (ptr = malloc (size));
if (NULL != ptr)
{
scm_mallocated = nm;
if (NULL != ptr)
{
scm_mallocated = nm;
scm_igc (what);
nm = scm_mallocated + size;
scm_igc (what);
nm = scm_mallocated + size;
- SCM_SYSCALL (ptr = (char *) malloc (size));
+ SCM_SYSCALL (ptr = malloc (size));
if (NULL != ptr)
{
scm_mallocated = nm;
if (NULL != ptr)
{
scm_mallocated = nm;
/* scm_must_realloc
* is similar to scm_must_malloc.
*/
/* scm_must_realloc
* is similar to scm_must_malloc.
*/
-char *
-scm_must_realloc (char *where,
+void *
+scm_must_realloc (void *where,
scm_sizet old_size,
scm_sizet size,
const char *what)
{
scm_sizet old_size,
scm_sizet size,
const char *what)
{
scm_sizet nm = scm_mallocated + size - old_size;
if (nm <= scm_mtrigger)
{
scm_sizet nm = scm_mallocated + size - old_size;
if (nm <= scm_mtrigger)
{
- SCM_SYSCALL (ptr = (char *) realloc (where, size));
+ SCM_SYSCALL (ptr = realloc (where, size));
if (NULL != ptr)
{
scm_mallocated = nm;
if (NULL != ptr)
{
scm_mallocated = nm;
scm_igc (what);
nm = scm_mallocated + size - old_size;
scm_igc (what);
nm = scm_mallocated + size - old_size;
- SCM_SYSCALL (ptr = (char *) realloc (where, size));
+ SCM_SYSCALL (ptr = realloc (where, size));
if (NULL != ptr)
{
scm_mallocated = nm;
if (NULL != ptr)
{
scm_mallocated = nm;
-scm_must_free (obj)
- char *obj;
+scm_must_free (void *obj)
extern void scm_mark_locations (SCM_STACKITEM x[], scm_sizet n);
extern int scm_cellp (SCM value);
extern void scm_gc_sweep (void);
extern void scm_mark_locations (SCM_STACKITEM x[], scm_sizet n);
extern int scm_cellp (SCM value);
extern void scm_gc_sweep (void);
-extern char * scm_must_malloc (scm_sizet len, const char *what);
-extern char * scm_must_realloc (char *where,
+extern void * scm_must_malloc (scm_sizet len, const char *what);
+extern void * scm_must_realloc (void *where,
scm_sizet olen, scm_sizet len,
const char *what);
extern void scm_done_malloc (long size);
scm_sizet olen, scm_sizet len,
const char *what);
extern void scm_done_malloc (long size);
-extern void scm_must_free (char *obj);
+extern void scm_must_free (void *obj);
extern void scm_remember (SCM * ptr);
extern SCM scm_return_first (SCM elt, ...);
extern SCM scm_permanent_object (SCM obj);
extern void scm_remember (SCM * ptr);
extern SCM scm_return_first (SCM elt, ...);
extern SCM scm_permanent_object (SCM obj);