[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] Fix C_u_i_s32vector_ref
From: |
megane |
Subject: |
[Chicken-hackers] [PATCH] Fix C_u_i_s32vector_ref |
Date: |
Wed, 17 Jul 2019 19:43:51 +0300 |
User-agent: |
mu4e 1.0; emacs 25.1.1 |
Hi,
Here's a small typo fix.
>From d79eb45c6f11dbffd4dc12b90d79f9660d2de97d Mon Sep 17 00:00:00 2001
From: megane <address@hidden>
Date: Wed, 17 Jul 2019 17:43:31 +0300
Subject: [PATCH] Fix C_u_i_s32vector_ref
Negative values were not returned correctly.
---
chicken.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chicken.h b/chicken.h
index 88bf4ab3..376f5dd2 100644
--- a/chicken.h
+++ b/chicken.h
@@ -1421,7 +1421,7 @@ typedef void (C_ccall *C_proc)(C_word, C_word *) C_noret;
/* these assume fixnum mode */
#define C_u_i_u32vector_ref(x, i) C_fix(((C_u32
*)C_data_pointer(C_block_item((x), 1)))[ C_unfix(i) ])
-#define C_u_i_s32vector_ref(x, i) C_fix(((C_u32
*)C_data_pointer(C_block_item((x), 1)))[ C_unfix(i) ])
+#define C_u_i_s32vector_ref(x, i) C_fix(((C_s32
*)C_data_pointer(C_block_item((x), 1)))[ C_unfix(i) ])
#define C_a_u_i_u32vector_ref(ptr, c, x, i) C_unsigned_int_to_num(ptr,
((C_u32 *)C_data_pointer(C_block_item((x), 1)))[ C_unfix(i) ])
#define C_a_u_i_s32vector_ref(ptr, c, x, i) C_int_to_num(ptr, ((C_s32
*)C_data_pointer(C_block_item((x), 1)))[ C_unfix(i) ])
--
2.17.1
- [Chicken-hackers] [PATCH] Fix C_u_i_s32vector_ref,
megane <=