Sagittarius bug fixes

This commit is contained in:
retropikzel 2024-09-13 07:39:53 +03:00
parent 70d843cc85
commit f41a7e098f
1 changed files with 5 additions and 2 deletions

View File

@ -48,7 +48,10 @@
((equal? type 'callback) 'callback) ((equal? type 'callback) 'callback)
(else (error "pffi-type->native-type -- No such pffi type" type))))) (else (error "pffi-type->native-type -- No such pffi type" type)))))
(define pffi-pointer? (lambda (object) (pointer? object))) (define pffi-pointer?
(lambda (object)
(or (string? object)
(pointer? object))))
(define-syntax pffi-define (define-syntax pffi-define
(syntax-rules () (syntax-rules ()
@ -158,7 +161,7 @@
((equal? native-type 'int64_t) (pointer-ref-c-int64_t p offset)) ((equal? native-type 'int64_t) (pointer-ref-c-int64_t p offset))
((equal? native-type 'uint64_t) (pointer-ref-c-uint64_t p offset)) ((equal? native-type 'uint64_t) (pointer-ref-c-uint64_t p offset))
((equal? native-type 'char) (pointer-ref-c-char p offset)) ((equal? native-type 'char) (pointer-ref-c-char p offset))
((equal? native-type 'short) (pointer-set-c-short p offset value)) ((equal? native-type 'short) (pointer-ref-c-short p offset))
((equal? native-type 'unsigned-short) (pointer-ref-c-unsigned-short p offset)) ((equal? native-type 'unsigned-short) (pointer-ref-c-unsigned-short p offset))
((equal? native-type 'int) (pointer-ref-c-int p offset)) ((equal? native-type 'int) (pointer-ref-c-int p offset))
((equal? native-type 'unsigned-int) (pointer-ref-c-unsigned-int p offset)) ((equal? native-type 'unsigned-int) (pointer-ref-c-unsigned-int p offset))