Changeset 33901 in project


Ignore:
Timestamp:
03/20/17 00:11:20 (5 months ago)
Author:
felix
Message:

lazy-ffi 1.8.6: added support for pointer-vectors, minor fixes

Location:
release/4/lazy-ffi
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/lazy-ffi/tags/1.8.6/lazy-ffi-support.scm

    r31515 r33901  
    2929                  lazy-ffi:function)
    3030
    31 (import scheme chicken (except foreign foreign-declare))
    32 (use srfi-1 srfi-69 easyffi)
     31(import scheme chicken foreign)
     32(use srfi-1 srfi-69 easyffi lolevel)
    3333
    3434(cond-expand
     
    123123  case LAZY_PTR_TYPE: rt = &ffi_type_pointer; break;
    124124  case LAZY_CHAR_TYPE: rt = &ffi_type_uint8; break;
    125   default: return LAZY_BAD_TYPE;
     125  default: return LAZY_BAD_RTYPE;
    126126  }
    127127
     
    302302    [LAZY_SCHEME_PTR_TYPE
    303303     (if (##sys#immediate? x)
    304          (error loc "immediate object can not be passes as pointer" x)
     304         (error loc "immediate object can not be passed as pointer" x)
    305305         x) ]
    306306    [else x] ) )
     
    317317        [(or (symbol? x) (string? x)) LAZY_STRING_TYPE]
    318318        [(##sys#immediate? x) LAZY_SCHEME_TYPE]
    319         [(srfi-4-vector? x) LAZY_SCHEME_PTR_TYPE]
    320319        [(or (##core#inline "C_pointerp" x)
    321320             (##core#inline "C_locativep" x)
     
    412411                            (cons (##sys#slot arg 1) argvals)
    413412                            (cons LAZY_SCHEME_PTR_TYPE argtypes) ) ]
     413                     ((pointer-vector? arg)
     414                      (loop (cdr args)
     415                            (cons (##sys#slot arg 2) argvals)
     416                            (cons LAZY_SCHEME_PTR_TYPE argtypes) ) )
    414417                     [else
    415418                      (loop (cdr args)
  • release/4/lazy-ffi/tags/1.8.6/lazy-ffi.setup

    r31515 r33901  
    99 '("lazy-ffi-support.so" "lazy-ffi.so" "lazy-ffi.import.so")
    1010 '((syntax)
    11    (version "1.8.5")
     11   (version "1.8.6")
    1212   (exports "lazy-ffi.exports")
    1313   (require-at-runtime lazy-ffi-support)))
  • release/4/lazy-ffi/trunk/lazy-ffi-support.scm

    r31515 r33901  
    2929                  lazy-ffi:function)
    3030
    31 (import scheme chicken (except foreign foreign-declare))
    32 (use srfi-1 srfi-69 easyffi)
     31(import scheme chicken foreign)
     32(use srfi-1 srfi-69 easyffi lolevel)
    3333
    3434(cond-expand
     
    123123  case LAZY_PTR_TYPE: rt = &ffi_type_pointer; break;
    124124  case LAZY_CHAR_TYPE: rt = &ffi_type_uint8; break;
    125   default: return LAZY_BAD_TYPE;
     125  default: return LAZY_BAD_RTYPE;
    126126  }
    127127
     
    302302    [LAZY_SCHEME_PTR_TYPE
    303303     (if (##sys#immediate? x)
    304          (error loc "immediate object can not be passes as pointer" x)
     304         (error loc "immediate object can not be passed as pointer" x)
    305305         x) ]
    306306    [else x] ) )
     
    317317        [(or (symbol? x) (string? x)) LAZY_STRING_TYPE]
    318318        [(##sys#immediate? x) LAZY_SCHEME_TYPE]
    319         [(srfi-4-vector? x) LAZY_SCHEME_PTR_TYPE]
    320319        [(or (##core#inline "C_pointerp" x)
    321320             (##core#inline "C_locativep" x)
     
    412411                            (cons (##sys#slot arg 1) argvals)
    413412                            (cons LAZY_SCHEME_PTR_TYPE argtypes) ) ]
     413                     ((pointer-vector? arg)
     414                      (loop (cdr args)
     415                            (cons (##sys#slot arg 2) argvals)
     416                            (cons LAZY_SCHEME_PTR_TYPE argtypes) ) )
    414417                     [else
    415418                      (loop (cdr args)
  • release/4/lazy-ffi/trunk/lazy-ffi.setup

    r31515 r33901  
    99 '("lazy-ffi-support.so" "lazy-ffi.so" "lazy-ffi.import.so")
    1010 '((syntax)
    11    (version "1.8.5")
     11   (version "1.8.6")
    1212   (exports "lazy-ffi.exports")
    1313   (require-at-runtime lazy-ffi-support)))
Note: See TracChangeset for help on using the changeset viewer.