From: Christophe R. <cr...@us...> - 2009-01-21 17:29:20
|
Update of /cvsroot/sbcl/sbcl/src/code In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25391/src/code Modified Files: host-alieneval.lisp 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: host-alieneval.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/code/host-alieneval.lisp,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- host-alieneval.lisp 5 Jan 2009 08:55:20 -0000 1.45 +++ host-alieneval.lisp 21 Jan 2009 17:29:08 -0000 1.46 @@ -658,8 +658,16 @@ (auxiliary-alien-type :enum name env) (when old-p (unless (alien-type-= result old) - (warn "redefining alien enum ~S" name)))) - (setf (auxiliary-alien-type :enum name env) result)) + (cerror "Continue, clobbering the old definition" + "Incompatible alien enum type definition: ~S" name) + (setf (alien-type-from old) (alien-type-from result) + (alien-type-to old) (alien-type-to result) + (alien-type-kind old) (alien-type-kind result) + (alien-type-offset old) (alien-type-offset result) + (alien-type-signed old) (alien-type-signed result))) + (setf result old)) + (unless old-p + (setf (auxiliary-alien-type :enum name env) result)))) result)) (name (multiple-value-bind (result found) |