[armedbear-cvs] r13192 - trunk/abcl/src/org/armedbear/lisp
Erik Huelsmann
ehuelsmann at common-lisp.net
Sun Jan 30 13:35:35 UTC 2011
Author: ehuelsmann
Date: Sun Jan 30 08:35:34 2011
New Revision: 13192
Log:
Signal an error containing the name of the class, when
the type of the CLASS-LAYOUT slot isn't what it is expected to be.
Modified:
trunk/abcl/src/org/armedbear/lisp/StandardObjectFunctions.java
Modified: trunk/abcl/src/org/armedbear/lisp/StandardObjectFunctions.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/StandardObjectFunctions.java (original)
+++ trunk/abcl/src/org/armedbear/lisp/StandardObjectFunctions.java Sun Jan 30 08:35:34 2011
@@ -49,8 +49,11 @@
if (arg instanceof StandardClass)
return ((StandardClass)arg).allocateInstance();
if (arg.typep(StandardClass.STANDARD_CLASS) != NIL) {
- Layout layout = (Layout)Symbol.CLASS_LAYOUT.execute(arg);
- return new StandardObject(layout);
+ LispObject l = Symbol.CLASS_LAYOUT.execute(arg);
+ if (! (l instanceof Layout))
+ return error(new ProgramError("Invalid standard class layout for: " + arg.writeToString()));
+
+ return new StandardObject((Layout)l);
}
return type_error(arg, Symbol.STANDARD_CLASS);
}
More information about the armedbear-cvs
mailing list