Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Conversation

@rasteiner
Copy link
Contributor

@rasteiner rasteiner commented Apr 28, 2025

This PR addresses the issue described in #134.

It fixes the issue here "on my machine", and I was waiting for someone else in the issue thread to confirm that it works elsewhere without introducing new bugs. My comment didn't get much attention however, so here we are.

The fix essentially is in this commit: rasteiner@807bc24

It essentially reproduces the same technique which is used elsewhere in the same code file: boxing the callback twice and then calling into_raw. See set_segment_callback_safe, set_segment_callback_safe_lossy and set_abort_callback_safe.
set_progress_callback_safe was the only place where &mut closure as *mut F as *mut c_void was used.

The other commits fix a spelling error of "progess" -> "progress" and merge unrelated new code from master.

Copy link
Owner

@tazz4843 tazz4843 left a comment

Choose a reason for hiding this comment

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

Sorry this took me so long to get around to, looks good. Thanks :)

@tazz4843 tazz4843 enabled auto-merge May 21, 2025 21:12
@tazz4843
Copy link
Owner

tazz4843 commented Jun 8, 2025

I seem to have missed that the Windows CI failed. Given this issue seems to be a Windows-specific problem and I have never seen it before I'm going to go ahead and bypass it, thanks for the PR :)

@tazz4843 tazz4843 disabled auto-merge June 8, 2025 06:24
@tazz4843 tazz4843 merged commit 3c37ed2 into tazz4843:master Jun 8, 2025
11 of 13 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants