diff options
author | Marius Vollmer <mvo@zagadka.de> | 2002-02-11 18:06:50 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2002-02-11 18:06:50 +0000 |
commit | 4c9419ac31f8364db51ccf25f7f9d5d31dd412e7 (patch) | |
tree | ecce968212c4bda96b3531e61b9724ea93777cc7 /libguile/struct.h | |
parent | d013f095c14783c193385cb67d3778a1240cd19b (diff) |
* gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
non-zero is returned from a port or smob free function.
(scm_malloc, scm_realloc, scm_strndup, scm_strdup,
scm_gc_register_collectable_memory,
scm_gc_unregister_collectable_memory, scm_gc_malloc,
scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.
* backtrace.c, continuations.c, convert.i.c, coop-threads.c,
debug-malloc.c, dynl.c, environments.c, environments.h,
extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
appropriate. Return zero from smob and port free functions.
* debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".
* fports.c (scm_setvbuf): Reset read buffer to saved values when
it is pointing to the putback buffer.
Diffstat (limited to 'libguile/struct.h')
-rw-r--r-- | libguile/struct.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libguile/struct.h b/libguile/struct.h index 20687e38a..7c784b14d 100644 --- a/libguile/struct.h +++ b/libguile/struct.h @@ -71,7 +71,7 @@ #define scm_vtable_index_printer 2 /* A printer for this struct type. */ #define scm_vtable_offset_user 3 /* Where do user fields start? */ -typedef size_t (*scm_t_struct_free) (scm_t_bits * vtable, scm_t_bits * data); +typedef void (*scm_t_struct_free) (scm_t_bits * vtable, scm_t_bits * data); #define SCM_STRUCTF_MASK (0xFFF << 20) #define SCM_STRUCTF_ENTITY (1L << 30) /* Indicates presence of proc slots */ @@ -107,11 +107,12 @@ SCM_API SCM scm_structs_to_free; -SCM_API scm_t_bits * scm_alloc_struct (int n_words, int n_extra, char * who); -SCM_API size_t scm_struct_free_0 (scm_t_bits * vtable, scm_t_bits * data); -SCM_API size_t scm_struct_free_light (scm_t_bits * vtable, scm_t_bits * data); -SCM_API size_t scm_struct_free_standard (scm_t_bits * vtable, scm_t_bits * data); -SCM_API size_t scm_struct_free_entity (scm_t_bits * vtable, scm_t_bits * data); +SCM_API scm_t_bits * scm_alloc_struct (int n_words, int n_extra, + const char *what); +SCM_API void scm_struct_free_0 (scm_t_bits * vtable, scm_t_bits * data); +SCM_API void scm_struct_free_light (scm_t_bits * vtable, scm_t_bits * data); +SCM_API void scm_struct_free_standard (scm_t_bits * vtable, scm_t_bits * data); +SCM_API void scm_struct_free_entity (scm_t_bits * vtable, scm_t_bits * data); SCM_API SCM scm_make_struct_layout (SCM fields); SCM_API SCM scm_struct_p (SCM x); SCM_API SCM scm_struct_vtable_p (SCM x); |