From 1b3a6a45ce35daf4c9c3c5a9fa769e76c6610242 Mon Sep 17 00:00:00 2001 From: jan Date: Sat, 12 Apr 2025 12:51:26 -0700 Subject: [PATCH] minor cleanup --- src/lib.rs | 4 +--- test.py | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 33b7598..78e359b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,9 +40,7 @@ pub unsafe extern "C" fn read_path( let input = fs::read(path).expect("File read failed"); let (_input, struct_arr) = read_library(&input).expect("Read failed"); - let (mut arr_v, mut schema_v) = to_ffi(&struct_arr.to_data()).unwrap(); - *arr = arr_v; - *schema = schema_v; + (*arr, *schema) = to_ffi(&struct_arr.to_data()).unwrap(); } diff --git a/test.py b/test.py index 998dff1..788df2e 100644 --- a/test.py +++ b/test.py @@ -10,8 +10,8 @@ from pyarrow.cffi import ffi path = '/home/jan/projects/masque/test.gds' -#clib = ctypes.CDLL('./libklamath_rs_ext.so') -clib = ffi.dlopen('./libklamath_rs_ext.so') +#clib = ctypes.CDLL('target/debug/libklamath_rs_ext.so') +clib = ffi.dlopen('target/debug/libklamath_rs_ext.so') ret_ptr_array = ffi.new('struct ArrowArray[]', 1)