diff options
author | Andy Wingo <wingo@pobox.com> | 2013-03-05 18:22:11 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-03-07 07:52:00 +0100 |
commit | 1b787ef9ec3a08f12d7b46403f4d508e583499a2 (patch) | |
tree | 3de23a56867f187ea00e02b64e4b6cecf5df341f /libguile/struct.c | |
parent | e20cec744fad8299afd9bbb6ac49505b15437618 (diff) | |
download | guile-1b787ef9ec3a08f12d7b46403f4d508e583499a2.tar.gz |
structs with tail arrays are not simple
* libguile/struct.h (SCM_VTABLE_FLAG_SIMPLE, SCM_VTABLE_FLAG_SIMPLE_RW):
* libguile/struct.c (set_vtable_layout_flags): Vtable whose layouts
include a tail array are not simple. Fixes bug 12808.
Diffstat (limited to 'libguile/struct.c')
-rw-r--r-- | libguile/struct.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libguile/struct.c b/libguile/struct.c index db1687ef8..3906a42cf 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 @@ -153,8 +153,9 @@ SCM_DEFINE (scm_make_struct_layout, "make-struct-layout", 1, 0, 0, #undef FUNC_NAME -/* Check whether VTABLE instances have a simple layout (i.e., either only "pr" - or only "pw" fields) and update its flags accordingly. */ +/* Check whether VTABLE instances have a simple layout (i.e., either + only "pr" or only "pw" fields and no tail array) and update its flags + accordingly. */ static void set_vtable_layout_flags (SCM vtable) { @@ -180,13 +181,11 @@ set_vtable_layout_flags (SCM vtable) switch (c_layout[field + 1]) { case 'w': - case 'W': if (field == 0) flags |= SCM_VTABLE_FLAG_SIMPLE_RW; break; case 'r': - case 'R': flags &= ~SCM_VTABLE_FLAG_SIMPLE_RW; break; |