Changeset 770


Ignore:
Timestamp:
Apr 13, 2004, 12:15:43 PM (21 years ago)
Author:
Gary Byers
Message:

(Partial) fixes to struct-returning method definitions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/examples/objc-runtime.lisp

    r766 r770  
    13861386         (selector nil)
    13871387         (argspecs nil)
    1388          (resulttype nil))
     1388         (resulttype nil)
     1389         (struct-return nil))
    13891390    (flet ((bad-selector (why) (error "Can't parse method selector ~s : ~a"
    13901391                                   selector-arg why)))
     
    14501451          (progn
    14511452            (push name argspecs)
     1453            (setq struct-return t)
    14521454            (push :address argspecs)
    14531455            (setq resulttype :void))
     
    14631465                                     `(:id :<sel> ,@(nreverse argtypes))
    14641466                                     resulttype))
    1465                 (push (car argspecs) argtypes))))))
     1467                (push (car argspecs) argtypes))
     1468              struct-return))))
    14661469
    14671470(defun objc-method-definition-form (class-p selector-arg class-arg body env)
     
    14711474                        argspecs
    14721475                        body
    1473                         typestring)
     1476                        typestring
     1477                        struct-return)
    14741478      (parse-objc-method selector-arg class-arg body)
    14751479      (multiple-value-bind (body decls) (parse-body body env)
     
    14831487               (self (intern "SELF"))
    14841488               (_cmd (intern "_CMD"))
    1485                (super (gensym "SUPER"))
    1486                (params `(:id ,self :<sel> ,_cmd ,@argspecs)))
     1489               (super (gensym "SUPER"))
     1490               (params `(:id ,self :<sel> ,_cmd)))
     1491          (when struct-return
     1492            (setq params `(,(car argspecs) ,(cadr argspecs) ,@params))
     1493            (setq argspecs (cddr argspecs)))
     1494          (setq params (nconc params argspecs))
    14871495          `(progn
    14881496            (defcallback ,impname
Note: See TracChangeset for help on using the changeset viewer.