mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
* 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.
This commit is contained in:
parent
d013f095c1
commit
4c9419ac31
36 changed files with 439 additions and 254 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue