mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Move <class> initialization to Scheme
* libguile/goops.c (scm_sys_make_root_class): Just make the vtable-vtable, and leave initialization to Scheme. * libguile/struct.c (scm_i_make_vtable_vtable): Change to take a full list of fields, not just the extra fields. (scm_init_struct): Adapt to scm_i_make_vtable_vtable change. * module/oop/goops.scm (<class>): Compute layout for <class>, and initialize <class> from here.
This commit is contained in:
parent
2b5812c64d
commit
4702cbeb37
4 changed files with 49 additions and 34 deletions
|
@ -3,7 +3,7 @@
|
|||
#ifndef SCM_STRUCT_H
|
||||
#define SCM_STRUCT_H
|
||||
|
||||
/* Copyright (C) 1995,1997,1999,2000,2001, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1997,1999,2000,2001, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015 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
|
||||
|
@ -181,7 +181,7 @@ SCM_API SCM scm_c_make_struct (SCM vtable, size_t n_tail, size_t n_inits,
|
|||
SCM_API SCM scm_c_make_structv (SCM vtable, size_t n_tail, size_t n_inits,
|
||||
scm_t_bits init[]);
|
||||
SCM_API SCM scm_make_vtable (SCM fields, SCM printer);
|
||||
SCM_INTERNAL SCM scm_i_make_vtable_vtable (SCM extra_fields);
|
||||
SCM_INTERNAL SCM scm_i_make_vtable_vtable (SCM fields);
|
||||
SCM_API SCM scm_struct_ref (SCM handle, SCM pos);
|
||||
SCM_API SCM scm_struct_set_x (SCM handle, SCM pos, SCM val);
|
||||
SCM_API SCM scm_struct_vtable (SCM handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue