Changeset 14182 in project


Ignore:
Timestamp:
04/08/09 08:49:24 (11 years ago)
Author:
Jim Ursetto
Message:

easyffi: Don't generate a specialization list when full specialization is
disabled, or spurious errors will occur for some types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/easyffi/easyffi-base.scm

    r12304 r14182  
    814814
    815815(define (process-prototype-def rtype name args io lvars cb #!optional (use-prefix #t))
    816   (let* ([name2 (fix-name name use-prefix)]
    817          [slist (gen-spec-list args io)]
    818          [vars (unzip1 slist)] )
     816  (let* ([name2 (fix-name name use-prefix)])
    819817    (emit
    820818     (if (and full-specialization (pair? args))
    821          (let ([tmp (gensym)])
     819         (let* ([slist (gen-spec-list args io)]
     820                [vars (unzip1 slist)]
     821                [tmp (gensym)])
    822822           `(begin
    823823              (declare (hide ,tmp))
     
    830830                                                   slist io (iota (length slist)) ))
    831831                ,(make-inout-wrapper tmp rtype vars args io lvars) ) ) )
    832          (let* ([io? (or (any identity io) (pair? lvars))]
     832         (let* ([vars (map (lambda (x) (gensym)) args)]
     833                [io? (or (any identity io) (pair? lvars))]
    833834                [fname (if io? (gensym) name2)] )
    834835           `(begin
     
    13071308             (rec (if (vector? a) (vector-ref a 0) a))
    13081309             '<top>) ) ]
     1310      ;; (nonnull-c-pointer "xyz") throws an error here
    13091311      (_ (parsing-error "unknown foreign type" ftype)))))
    13101312
Note: See TracChangeset for help on using the changeset viewer.