From 919f304fb29186302657c23f0702110075440291 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 18 Oct 2013 09:45:53 +0200 Subject: class-of fix for RTL programs * libguile/goops.c (scm_class_of): Use the same logic for RTL programs and stack VM programs. --- libguile/goops.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libguile/goops.c') 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); -- cgit v1.2.3