From: Christophe R. <cr...@us...> - 2009-01-21 17:29:15
|
Update of /cvsroot/sbcl/sbcl/tests In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25391/tests Modified Files: foreign.test.sh Log Message: 1.0.24.47: Fix 1.0.21.29 regression with enums in structs. This is not the most elegant of fixes, but arrange to return the old structure where applicable, and make incompatible mentions cause a CERROR with clobber continue semantics, to parallel what I think is the logic in the union/struct case. Index: foreign.test.sh =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/foreign.test.sh,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- foreign.test.sh 5 Jan 2009 08:55:20 -0000 1.39 +++ foreign.test.sh 21 Jan 2009 17:29:08 -0000 1.40 @@ -14,7 +14,9 @@ # absolutely no warranty. See the COPYING and CREDITS files for # more information. +. ./expect.sh . ./subr.sh + use_test_subdirectory echo //entering foreign.test.sh @@ -371,5 +373,28 @@ EOF check_status_maybe_lose "struct offsets" $? +cat > $TEST_FILESTEM.alien.enum.lisp <<EOF +(define-alien-type foo-flag + (enum foo-flag- + (:a 1) + (:b 2))) + +(define-alien-type bar + (struct bar + (foo-flag foo-flag))) + +(define-alien-type barp + (* bar)) + +(defun foo (x) + (declare (type (alien barp) x)) + x) + +(defun bar (x) + (declare (type (alien barp) x)) + x) +EOF +expect_clean_compile $TEST_FILESTEM.alien.enum.lisp + # success convention for script exit $EXIT_TEST_WIN |