Skip to content

Use c_char instead of i8 for callback #6

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

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Use c_char instead of i8 for callback #6

merged 1 commit into from
Feb 13, 2025

Conversation

Xeonacid
Copy link

@Xeonacid Xeonacid commented Feb 9, 2025

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

Same as sixel-bytes PR #3 [0].

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.

[0] benjajaja/sixel-bytes#3
[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
Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

A new release coming up 🧑‍🍳

@orhun orhun merged commit fea6a80 into orhun:master Feb 13, 2025
mfontanini added a commit to mfontanini/presenterm that referenced this pull request Feb 14, 2025
Includes orhun/sixel-rs#6 to fix build on
aarch64 and riscv64.

If possible, please make a new release so downstream maintainers like
Arch Linux RISC-V won't need to maintain this patch for an extended
period. :P
mfontanini pushed a commit to mfontanini/presenterm that referenced this pull request Feb 15, 2025
Includes orhun/sixel-rs#6 to fix build on aarch64 and riscv64.
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

Successfully merging this pull request may close these issues.

2 participants