mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Introduce make-struct/simple
* libguile/struct.h: * libguile/struct.c (scm_make_struct_simple): New function. * module/ice-9/boot-9.scm (make-record-type): Recast in terms of make-struct/simple. * module/ice-9/eval.scm (primitive-eval): Remove allocate-struct case. * module/srfi/srfi-9.scm (%%set-fields, %define-record-type): Use make-struct/simple.
This commit is contained in:
parent
557acdbbba
commit
5084fa4858
5 changed files with 70 additions and 43 deletions
|
@ -4,7 +4,7 @@
|
|||
#define SCM_STRUCT_H
|
||||
|
||||
/* Copyright (C) 1995,1997,1999-2001, 2006-2013, 2015,
|
||||
* 2017 Free Software Foundation, Inc.
|
||||
* 2017-2018 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -161,6 +161,7 @@ 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);
|
||||
SCM_INTERNAL SCM scm_allocate_struct (SCM vtable, SCM n_words);
|
||||
SCM_INTERNAL SCM scm_make_struct_simple (SCM vtable, SCM init);
|
||||
SCM_API SCM scm_make_struct_no_tail (SCM vtable, SCM init);
|
||||
SCM_API SCM scm_c_make_struct (SCM vtable, size_t n_tail, size_t n_inits,
|
||||
scm_t_bits init, ...);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue