* registry.el (registry-db): Don't oset-default an instance slot.
[gnus] / lisp / registry.el
index 27133db..f26101f 100644 (file)
             :type (or null float)
             :documentation "The registry version.")
    (max-size :initarg :max-size
-             ;; :initform most-positive-fixnum ;; see below
+            ;; EIEIO's :initform is not 100% compatible with CLOS in
+            ;; that if the form is an atom, it assumes it's constant
+            ;; value rather than an expression, so in order to get the value
+            ;; of `most-positive-fixnum', we need to use an
+            ;; expression that's not just a symbol.
+             :initform (symbol-value 'most-positive-fixnum)
              :type integer
              :custom integer
              :documentation "The maximum number of registry entries.")
    (data :initarg :data
          :type hash-table
          :documentation "The data hashtable.")))
-;; Do this separately, since defclass doesn't allow expressions in :initform.
-(oset-default 'registry-db max-size most-positive-fixnum)
 
 (defmethod initialize-instance :BEFORE ((this registry-db) slots)
   "Check whether a registry object needs to be upgraded."