Changeset 5799


Ignore:
Timestamp:
Jan 28, 2007, 2:21:17 AM (18 years ago)
Author:
Gary Byers
Message:

Remove some typos. Need to pass dynamic-extent, other decls separately.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lib/ffi-linuxppc32.lisp

    r5792 r5799  
    172172                                             (setq bias 2)
    173173                                             (if signed
    174                                                '%get-signed-word '
     174                                               '%get-signed-word
    175175                                               '%get-unsigned-word))
    176176                                            ((<= bits 32)
    177177                                             (if signed
    178                                                '%get-signed-long '
     178                                               '%get-signed-long
    179179                                               '%get-unsigned-long))
    180180                                            (t
     
    188188                    (dynamic-extent-names name))
    189189                  (setq gpr nextgpr fpr nextfpr offset nextoffset))))))))
    190                
     190
     191(defun linux32::generate-callback-return-value (stack-ptr result return-type struct-return-arg)
     192  (unless (eq return-type *void-foreign-type*)
     193    (let* ((return-type-keyword
     194            (if (typep return-type 'foreign-record-type)
     195              (progn
     196                (setq result `(%%get-unsigned-longlong ,struct-return-arg 0))
     197                :unsigned-doubleword)
     198              (foreign-type-to-representation-type return-type)))
     199           (offset (case return-type-keyword
     200                   ((:single-float :double-float)
     201                    8)
     202                   (t 0))))
     203      `(setf (,
     204              (case return-type-keyword
     205                (:address '%get-ptr)
     206                (:signed-doubleword '%%get-signed-longlong)
     207                (:unsigned-doubleword '%%get-unsigned-longlong)
     208                ((:double-float :single-float) '%get-double-float)
     209                (t '%get-long)) ,stack-ptr ,offset) ,result))))
     210     
    191211                 
Note: See TracChangeset for help on using the changeset viewer.