X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fhost-alieneval.lisp;h=4f018d641425858630607f5e9e4fdd1cf8d12971;hb=48ec282d877900caf5ea4ab42e9d87e566ce6b43;hp=56e743dd09b952f29f3e4c2917a9849e146c4018;hpb=4898ef32c639b1c7f4ee13a5ba566ce6debd03e6;p=sbcl.git diff --git a/src/code/host-alieneval.lisp b/src/code/host-alieneval.lisp index 56e743d..4f018d6 100644 --- a/src/code/host-alieneval.lisp +++ b/src/code/host-alieneval.lisp @@ -656,7 +656,7 @@ (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)) + (style-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))) @@ -966,14 +966,14 @@ (overall-alignment 1) (parsed-fields nil)) (dolist (field fields) - (destructuring-bind (var type &optional bits) field - (declare (ignore bits)) + (destructuring-bind (var type &key alignment) field (let* ((field-type (parse-alien-type type env)) (bits (alien-type-bits field-type)) - (alignment (alien-type-alignment field-type)) (parsed-field (make-alien-record-field :type field-type :name var))) + (unless alignment + (setf alignment (alien-type-alignment field-type))) (push parsed-field parsed-fields) (when (null bits) (error "unknown size: ~S" (unparse-alien-type field-type))) @@ -1045,15 +1045,6 @@ ;;;; the FUNCTION and VALUES alien types -;;; not documented in CMU CL:-( -;;; -;;; reverse engineering observations: -;;; * seems to be set when translating return values -;;; * seems to enable the translation of (VALUES), which is the -;;; Lisp idiom for C's return type "void" (which is likely -;;; why it's set when when translating return values) -(defvar *values-type-okay* nil) - (define-alien-type-class (fun :include mem-block) (result-type (missing-arg) :type alien-type) (arg-types (missing-arg) :type list)