(unless (and max (> max val)) (setq max val))
(unless (and min (< min val)) (setq min val))
(when (rassoc val from-alist)
- (error "The element value ~S is used more than once." val))
+ (warn "The element value ~S is used more than once." val))
(when (assoc sym from-alist :test #'eq)
(error "The enumeration element ~S is used more than once." sym))
(push (cons sym val) from-alist)))
(let ((type (parse-alien-type spec env)))
(if (or (alien-integer-type-p type)
(alien-float-type-p type)
- (alien-pointer-type-p type))
+ (alien-pointer-type-p type)
+ (alien-system-area-pointer-type-p type))
(ceiling (alien-type-word-aligned-bits type) sb!vm:n-byte-bits)
(error "Unsupported callback argument type: ~A" type))))
(deref integer-array 1)))
(assert (eql (deref enum-array 2) 'k-two))))
+;; enums used to allow values to be used only once
+;; C enums allow for multiple tags to point to the same value
+(define-alien-type enum.4
+ (enum nil (:key1 1) (:key2 2) (:keytwo 2)))
+(with-alien ((enum-array (array enum.4 3)))
+ (setf (deref enum-array 0) :key1)
+ (setf (deref enum-array 1) :key2)
+ (setf (deref enum-array 2) :keytwo)
+ (assert (and (eql (deref enum-array 1) (deref enum-array 2))
+ (eql (deref enum-array 1) :key2))))
+
;;; As reported by Baughn on #lisp, ALIEN-FUNCALL loops forever when
;;; compiled with (DEBUG 3).
(sb-kernel::values-specifier-type-cache-clear)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.4.10"
+"0.9.4.11"