Changeset 10671


Ignore:
Timestamp:
Sep 9, 2008, 5:13:10 PM (11 years ago)
Author:
gb
Message:

Handle :bits-per-long attribute in foreign-type-data initialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/foreign-types.lisp

    r10650 r10671  
    102102                    :attributes
    103103                    '(:bits-per-word #+64-bit-target 64 #+32-bit-target 32
     104                      #+win64-target :bits-per-long #+win64-target 32
    104105                      :signed-char #+darwinppc-target t #-darwinppc-target nil
    105106                      :struct-by-value #+darwinppc-target t #-darwinppc-target nil
     
    17431744(defun install-standard-foreign-types (ftd)
    17441745  (let* ((*target-ftd* ftd)
    1745          (natural-word-size (getf (ftd-attributes ftd) :bits-per-word)))
     1746         (natural-word-size (getf (ftd-attributes ftd) :bits-per-word))
     1747         (long-word-size (or (getf (ftd-attributes ftd) :bits-per-long)
     1748                             natural-word-size)))
    17461749
    17471750    (def-foreign-type-translator signed (&optional (bits 32))
     
    18701873    (def-foreign-type address (* :void))
    18711874    (let* ((signed-long-type (parse-foreign-type
    1872                               `(:signed ,natural-word-size)))
     1875                              `(:signed ,long-word-size)))
    18731876           (unsigned-long-type (parse-foreign-type
    1874                                 `(:unsigned ,natural-word-size))))
     1877                                `(:unsigned ,long-word-size))))
    18751878      (%def-foreign-type :long signed-long-type ftd)
    18761879      (%def-foreign-type :signed-long signed-long-type ftd)
Note: See TracChangeset for help on using the changeset viewer.