minor cleanup

This commit is contained in:
jan 2025-04-12 12:51:26 -07:00
parent e2ba1390c6
commit 1b3a6a45ce
2 changed files with 3 additions and 5 deletions

View File

@ -40,9 +40,7 @@ pub unsafe extern "C" fn read_path(
let input = fs::read(path).expect("File read failed"); let input = fs::read(path).expect("File read failed");
let (_input, struct_arr) = read_library(&input).expect("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, *schema) = to_ffi(&struct_arr.to_data()).unwrap();
*arr = arr_v;
*schema = schema_v;
} }

View File

@ -10,8 +10,8 @@ from pyarrow.cffi import ffi
path = '/home/jan/projects/masque/test.gds' path = '/home/jan/projects/masque/test.gds'
#clib = ctypes.CDLL('./libklamath_rs_ext.so') #clib = ctypes.CDLL('target/debug/libklamath_rs_ext.so')
clib = ffi.dlopen('./libklamath_rs_ext.so') clib = ffi.dlopen('target/debug/libklamath_rs_ext.so')
ret_ptr_array = ffi.new('struct ArrowArray[]', 1) ret_ptr_array = ffi.new('struct ArrowArray[]', 1)