In defcstruct, there was a line, removed in
be6267709f, that set a
default type class name by appending "-TCLASS". Without this line,
the class will be directly FOREIGN-STRUCT-TYPE instead of a subclass.
This is acceptable if the translate methods are not going to be
redefined, but if they are, any change will apply to all instances
(including instances of subclasses of other structures, which may call
these with call-next-method). In fact, there is a check in
define-translation-method to prevent redefinition with that macro, but
of course a defmethod would be just as bad.
While in principal one can specify the :class argument, this isn't
always possible, for example, if the structure was made by groveling.
Even so, it is a bad idea to make a default which has the potential
for this kind of harm.
This fix now permits GSLL to compile and load correctly.
(ensure-list name-and-options)
(let ((conc-name (getf options :conc-name)))
(remf options :conc-name)
+ (unless (getf options :class) (setf (getf options :class) (symbolicate name '-tclass)))
`(eval-when (:compile-toplevel :load-toplevel :execute)
;; m-f-s-t could do with this with mop:ensure-class.
,(when-let (class (getf options :class))