From bc385580d651f1b331cde624a225338b29f60baf Mon Sep 17 00:00:00 2001 From: retropikzel Date: Mon, 22 Jul 2024 20:53:37 +0300 Subject: [PATCH] Guile pointer set and get fixes --- retropikzel/r7rs-pffi/version/guile.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/retropikzel/r7rs-pffi/version/guile.scm b/retropikzel/r7rs-pffi/version/guile.scm index 61812e5..7fc34ea 100644 --- a/retropikzel/r7rs-pffi/version/guile.scm +++ b/retropikzel/r7rs-pffi/version/guile.scm @@ -108,16 +108,16 @@ (lambda (pointer type offset value) (let ((p (pointer->bytevector pointer (+ offset 100))) (native-type (pffi-type->native-type type))) - (cond ((equal? native-type int8) (bytevector-s8-set! p offset value (native-endianness))) - ((equal? native-type uint8) (bytevector-u8-set! p offset value (native-endianness))) + (cond ((equal? native-type int8) (bytevector-s8-set! p offset value)) + ((equal? native-type uint8) (bytevector-u8-set! p offset value)) ((equal? native-type int16) (bytevector-s16-set! p offset value (native-endianness))) ((equal? native-type uint16) (bytevector-u16-set! p offset value (native-endianness))) ((equal? native-type int32) (bytevector-s32-set! p offset value (native-endianness))) ((equal? native-type uint32) (bytevector-u32-set! p offset value (native-endianness))) ((equal? native-type int64) (bytevector-s64-set! p offset value (native-endianness))) ((equal? native-type uint64) (bytevector-u64-set! p offset value (native-endianness))) - ((equal? native-type short) (bytevector-s8-set! p offset value (native-endianness))) - ((equal? native-type unsigned-short) (bytevector-u8-set! p offset value (native-endianness))) + ((equal? native-type short) (bytevector-s8-set! p offset value)) + ((equal? native-type unsigned-short) (bytevector-u8-set! p offset value)) ((equal? native-type int) (bytevector-sint-set! p offset value (native-endianness) (pffi-size-of type))) ((equal? native-type unsigned-int) (bytevector-uint-set! p offset value (native-endianness) (pffi-size-of type))) ((equal? native-type long) (bytevector-s64-set! p offset value (native-endianness)))