mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 14:21:10 +02:00
* goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
slots with instance allocation.
This commit is contained in:
parent
bbf8d52350
commit
b46fae006d
2 changed files with 17 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
||||||
2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||||
|
|
||||||
|
* goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
|
||||||
|
slots with instance allocation.
|
||||||
|
|
||||||
* goops.c, goops.h (scm_class_extended_generic_with_setter): New
|
* goops.c, goops.h (scm_class_extended_generic_with_setter): New
|
||||||
class.
|
class.
|
||||||
(scm_compute_applicable_methods): Use scm_generic_function_methods.
|
(scm_compute_applicable_methods): Use scm_generic_function_methods.
|
||||||
|
|
|
@ -466,6 +466,8 @@ SCM_DEFINE (scm_sys_initialize_object, "%initialize-object", 2, 0, 0,
|
||||||
|
|
||||||
|
|
||||||
SCM_KEYWORD (k_class, "class");
|
SCM_KEYWORD (k_class, "class");
|
||||||
|
SCM_KEYWORD (k_allocation, "allocation");
|
||||||
|
SCM_KEYWORD (k_instance, "instance");
|
||||||
|
|
||||||
SCM_DEFINE (scm_sys_prep_layout_x, "%prep-layout!", 1, 0, 0,
|
SCM_DEFINE (scm_sys_prep_layout_x, "%prep-layout!", 1, 0, 0,
|
||||||
(SCM class),
|
(SCM class),
|
||||||
|
@ -492,14 +494,23 @@ SCM_DEFINE (scm_sys_prep_layout_x, "%prep-layout!", 1, 0, 0,
|
||||||
for (i = 0; i < n; i += 2)
|
for (i = 0; i < n; i += 2)
|
||||||
{
|
{
|
||||||
long len;
|
long len;
|
||||||
SCM type;
|
SCM type, allocation;
|
||||||
char p, a;
|
char p, a;
|
||||||
|
|
||||||
if (!SCM_CONSP (slots))
|
if (!SCM_CONSP (slots))
|
||||||
SCM_MISC_ERROR ("too few slot definitions", SCM_EOL);
|
SCM_MISC_ERROR ("too few slot definitions", SCM_EOL);
|
||||||
len = scm_ilength (SCM_CDAR (slots));
|
len = scm_ilength (SCM_CDAR (slots));
|
||||||
type = scm_i_get_keyword (k_class, SCM_CDAR (slots), len, SCM_BOOL_F,
|
allocation = scm_i_get_keyword (k_allocation, SCM_CDAR (slots),
|
||||||
FUNC_NAME);
|
len, k_instance, FUNC_NAME);
|
||||||
|
while (!SCM_EQ_P (allocation, k_instance))
|
||||||
|
{
|
||||||
|
slots = SCM_CDR (slots);
|
||||||
|
len = scm_ilength (SCM_CDAR (slots));
|
||||||
|
allocation = scm_i_get_keyword (k_allocation, SCM_CDAR (slots),
|
||||||
|
len, k_instance, FUNC_NAME);
|
||||||
|
}
|
||||||
|
type = scm_i_get_keyword (k_class, SCM_CDAR (slots),
|
||||||
|
len, SCM_BOOL_F, FUNC_NAME);
|
||||||
if (SCM_FALSEP (type))
|
if (SCM_FALSEP (type))
|
||||||
{
|
{
|
||||||
p = 'p';
|
p = 'p';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue