Use c_char instead of i8 for callback #6
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Same as sixel-bytes PR benjajaja/sixel-bytes#3.
c_char is unsigned on platforms like aarch64 and riscv64. Forcing i8 results in a compile error at
slice::from_raw_parts_mut
[1].Tested with presenterm [2] on both x86_64 and riscv64.
[1] https://github.com/benjajaja/sixel-bytes/blob/b41fda544a6ade744c9e6f98f1fa9ff876d048f4/src/lib.rs#L159
[2] https://gitlab.archlinux.org/archlinux/packaging/packages/presenterm/-/blob/main/PKGBUILD
If possible, please make a new release so we can incorporate the change into
presenterm
soon, so downstream maintainers like Arch Linux RISC-V won't need to maintain this patch for an extended period. :P