Fix guile pointer access on pointer access

This commit is contained in:
retropikzel 2024-06-22 10:40:36 +03:00
parent 064ca3d668
commit 62466ab919
1 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@
((equal? native-type unsigned-long) (bytevector-u64-set! p offset value (native-endianness))) ((equal? native-type unsigned-long) (bytevector-u64-set! p offset value (native-endianness)))
((equal? native-type float) (bytevector-u64-set! p offset value (native-endianness))) ((equal? native-type float) (bytevector-u64-set! p offset value (native-endianness)))
((equal? native-type double) (bytevector-u64-set! p offset value (native-endianness))) ((equal? native-type double) (bytevector-u64-set! p offset value (native-endianness)))
((equal? native-type '*) (bytevector-sint-set! p offset value (native-endianness) (pffi-size-of type))))))) ((equal? native-type '*) (bytevector-u32-set! p offset (pointer-address value) (native-endianness) (pffi-size-of type)))))))
(define pffi-pointer-get (define pffi-pointer-get
(lambda (pointer type offset) (lambda (pointer type offset)
@ -136,7 +136,7 @@
((equal? native-type unsigned-long) (bytevector-u64-ref p offset (native-endianness))) ((equal? native-type unsigned-long) (bytevector-u64-ref p offset (native-endianness)))
((equal? native-type float) (bytevector-u64-ref p offset (native-endianness))) ((equal? native-type float) (bytevector-u64-ref p offset (native-endianness)))
((equal? native-type double) (bytevector-u64-ref p offset (native-endianness))) ((equal? native-type double) (bytevector-u64-ref p offset (native-endianness)))
((equal? native-type '*) (bytevector-sint-ref p offset (native-endianness) (pffi-size-of type))))))) ((equal? native-type '*) (make-pointer (bytevector-u32-ref p offset (native-endianness))))))))
(define pffi-pointer-deref (define pffi-pointer-deref
(lambda (pointer) (lambda (pointer)