mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* struct.c, struct.h (scm_struct_free_0, scm_struct_free_light,
scm_struct_free_standard, scm_struct_free_entity): Declared to return scm_sizet instead of size_t.
This commit is contained in:
parent
681b900590
commit
97056309c3
2 changed files with 9 additions and 9 deletions
|
@ -331,20 +331,20 @@ scm_alloc_struct (int n_words, int n_extra, char *who)
|
|||
return p;
|
||||
}
|
||||
|
||||
size_t
|
||||
scm_sizet
|
||||
scm_struct_free_0 (SCM *vtable, SCM *data)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t
|
||||
scm_sizet
|
||||
scm_struct_free_light (SCM *vtable, SCM *data)
|
||||
{
|
||||
free (data);
|
||||
return vtable[scm_struct_i_size] & ~SCM_STRUCTF_MASK;
|
||||
}
|
||||
|
||||
size_t
|
||||
scm_sizet
|
||||
scm_struct_free_standard (SCM *vtable, SCM *data)
|
||||
{
|
||||
size_t n = ((data[scm_struct_i_n_words] + scm_struct_n_extra_words)
|
||||
|
@ -353,7 +353,7 @@ scm_struct_free_standard (SCM *vtable, SCM *data)
|
|||
return n;
|
||||
}
|
||||
|
||||
size_t
|
||||
scm_sizet
|
||||
scm_struct_free_entity (SCM *vtable, SCM *data)
|
||||
{
|
||||
size_t n = ((data[scm_struct_i_n_words] + scm_struct_entity_n_extra_words)
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
#define scm_vtable_index_printer 3 /* A printer for this struct type. */
|
||||
#define scm_vtable_offset_user 4 /* Where do user fields start? */
|
||||
|
||||
typedef size_t (*scm_struct_free_t) (SCM *vtable, SCM *data);
|
||||
typedef scm_sizet (*scm_struct_free_t) (SCM *vtable, SCM *data);
|
||||
|
||||
#define SCM_STRUCTF_MASK (0xFFF << 20)
|
||||
#define SCM_STRUCTF_ENTITY (1L << 30) /* Indicates presence of proc slots */
|
||||
|
@ -95,10 +95,10 @@ extern SCM scm_struct_table;
|
|||
extern SCM *scm_alloc_struct (int n_words,
|
||||
int n_extra,
|
||||
char *who);
|
||||
extern size_t scm_struct_free_0 (SCM *vtable, SCM *data);
|
||||
extern size_t scm_struct_free_light (SCM *vtable, SCM *data);
|
||||
extern size_t scm_struct_free_standard (SCM *vtable, SCM *data);
|
||||
extern size_t scm_struct_free_entity (SCM *vtable, SCM *data);
|
||||
extern scm_sizet scm_struct_free_0 (SCM *vtable, SCM *data);
|
||||
extern scm_sizet scm_struct_free_light (SCM *vtable, SCM *data);
|
||||
extern scm_sizet scm_struct_free_standard (SCM *vtable, SCM *data);
|
||||
extern scm_sizet scm_struct_free_entity (SCM *vtable, SCM *data);
|
||||
extern void scm_struct_init SCM_P ((SCM handle, int tail_elts, SCM inits));
|
||||
extern SCM scm_make_struct_layout SCM_P ((SCM fields));
|
||||
extern SCM scm_struct_p SCM_P ((SCM x));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue