Changeset 5793
- Timestamp:
- Jan 25, 2007, 3:37:51 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lib/foreign-types.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lib/foreign-types.lisp
r5787 r5793 392 392 393 393 (defun auxiliary-foreign-type (kind name &optional (ftd *target-ftd*)) 394 (flet ((aux-defn-matches (x) 395 (and (eq (first x) kind) (eq (second x) name)))) 396 (let ((in-auxiliaries 397 (or (find-if #'aux-defn-matches *new-auxiliary-types*) 398 (find-if #'aux-defn-matches *auxiliary-type-definitions*)))) 399 (if in-auxiliaries 400 (values (third in-auxiliaries) t) 401 (ecase kind 402 (:struct 403 (info-foreign-type-struct name ftd)) 404 (:union 405 (info-foreign-type-union name ftd)) 406 (:enum 407 (info-foreign-type-enum name ftd))))))) 408 409 (defun %set-auxiliary-foreign-type (kind name defn) 394 (or 395 (ecase kind 396 (:struct 397 (info-foreign-type-struct name ftd)) 398 (:union 399 (info-foreign-type-union name ftd)) 400 (:enum 401 (info-foreign-type-enum name ftd))) 402 (flet ((aux-defn-matches (x) 403 (and (eq (first x) kind) (eq (second x) name)))) 404 (let ((in-auxiliaries 405 (or (find-if #'aux-defn-matches *new-auxiliary-types*) 406 (find-if #'aux-defn-matches *auxiliary-type-definitions*)))) 407 (if in-auxiliaries 408 (values (third in-auxiliaries) t)))))) 409 410 (defun %set-auxiliary-foreign-type (kind name defn &optional (ftd *target-ftd*)) 410 411 (flet ((aux-defn-matches (x) 411 412 (and (eq (first x) kind) (eq (second x) name)))) … … 415 416 (error "Attempt to shadow definition of ~A ~S." kind name))) 416 417 (push (list kind name defn) *new-auxiliary-types*) 418 (ecase kind 419 (:struct 420 (setf (info-foreign-type-struct name ftd) defn)) 421 (:union 422 (setf (info-foreign-type-union name ftd) defn)) 423 (:enum 424 (setf (info-foreign-type-enum name ftd) defn))) 417 425 defn) 418 426
Note:
See TracChangeset
for help on using the changeset viewer.
