summaryrefslogtreecommitdiff
path: root/libguile/goops.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-10-18 09:45:53 +0200
committerAndy Wingo <wingo@pobox.com>2013-10-18 09:45:53 +0200
commit919f304fb29186302657c23f0702110075440291 (patch)
tree02ae9d7ebf0cd2ad2bad400d53005440cd0c8f35 /libguile/goops.c
parent361d0de285587ef4c9f19b9e07c1175424520aa5 (diff)
downloadguile-919f304fb29186302657c23f0702110075440291.tar.gz
class-of fix for RTL programs
* libguile/goops.c (scm_class_of): Use the same logic for RTL programs and stack VM programs.
Diffstat (limited to 'libguile/goops.c')
-rw-r--r--libguile/goops.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libguile/goops.c b/libguile/goops.c
index 74ded73ff..49840bf4a 100644
--- a/libguile/goops.c
+++ b/libguile/goops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2008,2009,2010,2011,2012
+/* Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2008,2009,2010,2011,2012,2013
* Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -295,15 +295,18 @@ SCM_DEFINE (scm_class_of, "class-of", 1, 0, 0,
return scm_class_fraction;
}
case scm_tc7_program:
+ case scm_tc7_rtl_program:
+ /* Although SCM_SUBR_GENERIC is specific to stack programs
+ currently, in practice only stack programs pass
+ SCM_PROGRAM_IS_PRIMITIVE_GENERIC. In the future this will
+ change to be the other way around, when subrs become RTL
+ programs. */
if (SCM_PROGRAM_IS_PRIMITIVE_GENERIC (x)
&& SCM_UNPACK (*SCM_SUBR_GENERIC (x)))
return scm_class_primitive_generic;
else
return scm_class_procedure;
- case scm_tc7_rtl_program:
- return scm_class_procedure;
-
case scm_tc7_smob:
{
scm_t_bits type = SCM_TYP16 (x);