fix segfault in goops if class fields are redefined
authorAndy Wingo <wingo@pobox.com>
Thu, 20 Oct 2011 22:22:44 +0000 (00:22 +0200)
committerAndy Wingo <wingo@pobox.com>
Thu, 20 Oct 2011 22:22:50 +0000 (00:22 +0200)
commit13d807b7d36594676c5aa683c595eca8dbe26b57
treeedab2395c5f0795c5a49e9aa190b45a837406c37
parentaa9c19858872a135ea959066fff26f86527a1bd0
fix segfault in goops if class fields are redefined

* libguile/goops.c (map, filter_cpl, remove_duplicate_slots): Use
  scm_is_pair instead of !scm_is_null, given that we use accessor
  macros.
  (check_cpl, build_slots_list): Check that descendents of <class> can't
  redefine slots of <class>.

* test-suite/tests/goops.test ("defining classes"): Add a test.

Patch originally by Stefan Israelsson Tampe.
libguile/goops.c
test-suite/tests/goops.test