[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] scratch/record 25aa500 5/5: Backward compatibility wit
Re: [Emacs-diffs] scratch/record 25aa500 5/5: Backward compatibility with pre-existing struct instances.
Wed, 29 Mar 2017 08:52:32 +0200
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Stefan Monnier <address@hidden> writes:
>> (let ((tag (intern (format "cl-struct-%s" name)))
>> (type-and-named (get name 'cl-struct-type))
>> (descs (get name 'cl-struct-slots)))
>> + (if (null (car type-and-named))
>> + (setq type-and-named (cons 'record (cdr type-and-named))))
>> (cl-struct-define name nil (get name 'cl-struct-include)
>> (unless (and (eq (car type-and-named) 'vector)
>> (null (cadr type-and-named))
> Hmm... if we're in this code, it means we're in the case of an old-old
> struct (once compiled before we introduced cl-struct-define), so it's
> definitely not using `record`s.
Good, I'll remove that code.
There's also a lingering FIXME that you added:
- (:type vector) ;We manage our own tagging system.
+ (:type vector) ;; FIXME! ;We manage our own tagging system.
As far as I can see, the struct isn't used directly. These definitions
are derived from it: eieio--object-class-tag, eieio--object-class-tag,
and eieio--object-num-slot. The first two just aref slot 0, and the
second is 1.