ndarray-linalg icon indicating copy to clipboard operation
ndarray-linalg copied to clipboard

use platform dependent c_char instead of hardcoded i8

Open mike-kfed opened this issue 2 years ago • 7 comments

this should fix issue #351

I am willing to adapt to your preferences, but this works for me (tm)

mike-kfed avatar May 05 '23 12:05 mike-kfed

I have tested this on both x86_64 and aarch64 and it works. Would be great to see it merged.

seddonm1 avatar Jul 11 '23 04:07 seddonm1

And also this @termoshtt .Thanks very much!

Dirreke avatar Feb 03 '24 07:02 Dirreke

@mike-kfed Thanks for putting this together!

Is there a reason to use libc::c_char instead of std::ffi::c_char or std::os::raw::c_char?

I think either of those may be equivalent, and avoids adding the dependency on libc.

leecbaker avatar Mar 12 '24 07:03 leecbaker

@leecbaker honestly I just followed the advice found in an open issue and "just wanted to make it work" (tm) ;)

I'll remove the dependency on libc, you are correct the other Rust std lib c_char definitions should be fine too.

mike-kfed avatar Mar 12 '24 08:03 mike-kfed

I'm using this in armv7-unknown-linux-gnueabihf and it works too.

daniestevez avatar Apr 27 '24 07:04 daniestevez

Encountered this issue today when our CI was switched to AWS C7g instances, that are using ARM Graviton3 processors.

It seems that this PR fixes the issue. Would it possible to merge it, so that it can become available in upstream? 👀 Thankie!

FylmTM avatar May 14 '24 07:05 FylmTM