Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make generated abc bindings portable across different char signedness #4

Open
jix opened this issue Sep 16, 2024 · 0 comments
Open

Comments

@jix
Copy link
Member

jix commented Sep 16, 2024

Whether char is signed or unsigned depends on the target platform, and the generated bindings at abc-sys/src/generated/bindings.rs contain an instance of a char constant l_False set to -1 which means the bindings generated on a platform with a signed char fail to build on a platform with an unsigned char as rust doesn't allow implicit casts between signed and unsigned types.

The easiest fix would be to change the l_False definition in abc (abc-sys/abc/src/sat/bsat/satVec.h) to explicitly use a signed char since that seems appropriate given it the range of values it holds, but I still need to double check that this has no negative consequences. Alternatively l_False could be excluded in the bindgen generation, as we're not actually calling directly into that part of abc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant