Changeset 14799 in project for chicken/trunk


Ignore:
Timestamp:
05/26/09 23:33:44 (11 years ago)
Author:
felix winkelmann
Message:

hopefully better unsigned-c-string support

Location:
chicken/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/c-backend.scm

    r13138 r14799  
    11921192      [(f32vector nonnull-f32vector) (str "float *")]
    11931193      [(f64vector nonnull-f64vector) (str "double *")]
    1194       [(nonnull-c-string c-string nonnull-c-string* c-string*
    1195                          nonnull-unsigned-c-string nonnull-unsigned-c-string* unsigned-c-string*
    1196                          symbol) (str "char *")]
     1194      [(nonnull-c-string c-string nonnull-c-string* c-string* symbol)
     1195       (str "char *")]
     1196      [(nonnull-unsigned-c-string nonnull-unsigned-c-string* unsigned-c-string unsigned-c-string*)
     1197       (str "unsigned char *")]
    11971198      [(void) (str "void")]
    11981199      [else
  • chicken/trunk/expand.scm

    r14781 r14799  
    4848
    4949(cond-expand
    50  (chicken ;(not debugbuild)
     50 ((not debugbuild)
    5151  (begin
    5252    (declare
     
    8585        alias) ) )
    8686
    87 #+(not debugbuild)
     87#+debugbuild
    8888(define (map-se se)
    8989  (map (lambda (a)
  • chicken/trunk/support.scm

    r14779 r14799  
    956956             [(nonnull-c-pointer)
    957957              `(##sys#foreign-pointer-argument ,param) ]
    958              [(c-string c-string* unsigned-c-string*)
     958             [(c-string c-string* unsigned-c-string unsigned-c-string*)
    959959              (let ([tmp (gensym)])
    960960                `(let ([,tmp ,param])
     
    10401040        0)
    10411041       ((c-string nonnull-c-string c-pointer nonnull-c-pointer symbol c-string* nonnull-c-string*
    1042                   unsigned-c-string* nonnull-unsigned-c-string*
     1042                  unsigned-c-string unsigned-c-string* nonnull-unsigned-c-string*
    10431043                  c-string-list c-string-list*)
    10441044        (words->bytes 3) )
     
    10691069              c-pointer pointer nonnull-c-pointer unsigned-integer integer float c-string symbol
    10701070              scheme-pointer nonnull-scheme-pointer int32 unsigned-int32 integer32 unsigned-integer32
    1071               unsigned-c-string* nonnull-unsigned-c-string*
     1071              unsigned-c-string unsigned-c-string* nonnull-unsigned-c-string*
    10721072              nonnull-c-string c-string* nonnull-c-string* c-string-list c-string-list*) ; pointer and nonnull-pointer are DEPRECATED
    10731073        (words->bytes 1) )
     
    10901090(define (finish-foreign-result type body)
    10911091  (case type
    1092     [(c-string) `(##sys#peek-c-string ,body '0)]
     1092    [(c-string unsigned-c-string) `(##sys#peek-c-string ,body '0)]
    10931093    [(nonnull-c-string) `(##sys#peek-nonnull-c-string ,body '0)]
    10941094    [(c-string* unsigned-c-string*) `(##sys#peek-and-free-c-string ,body '0)]
Note: See TracChangeset for help on using the changeset viewer.