forked from GNOME/glib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checking in changes from https://github.com/kleisauke/wasm-vips.
These are the original set of changes very kindly organized and released in a patch by https://github.com/kleisauke. The details of this patch are in this thread: emscripten-core/emscripten#11066.
- Loading branch information
Showing
108 changed files
with
913 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
95b6d0e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, see also the "Upstream patches" item at https://github.com/users/kleisauke/projects/1 for the reason why these GLib patches are not upstreamed yet.
95b6d0e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! I should have browsed your repos to see if you had already forked these projects! It would have made things much easier for me :). FYI I'm going to delete this repo and fork your glib repo instead.
Yeah, I didn't expect (nor, TBH, did I plan for) these projects to accept the Emscripten changes. It would definitely be nice to not have to maintain all these forks. But my main intention is to publish the source code of a huge GPLv2 project that I just finished porting to Emscripten.
While we're on the topic of GLib: the function pointer conversion rule in the link you mentioned is technically 100% compatible with Emscripten. GLib's doc says that a pointer has to be castable to
void*
and back again - presumably to the same pointer type.What they're doing is taking a function pointer, maybe casting it to
void*
, but then casting it back to another completely different pointer type! According to the C language spec on function pointer casts (emphasis mine):And according to the same spec, functions (at least non-K&R-style) are compatible if:
I'm sure I'm preaching to the choir here - but it's insane that they're doing this in the first place. We just happened to be lucky that most ABIs, so far, don't break if you append extra arguments. Well, most ABIs until Emscripten :).
Anyway, my point is that they should absolutely at least take our function pointer conversion fixes. The conversion fixes are mostly free because the compiler should be able to easily inline the trampolines (or ignore the extra parameter declaration). There was only one case (adding g_test suites/cases) where I had to add an allocation, but that was because I was in a hurry; I'm sure there's a way to do it cheaply.
Cheers, and thanks releasing all your ports!
95b6d0e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inb4 delete (preventing me from correctly responding to this).
95b6d0e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, did you see comment: emscripten-core/emscripten#11066 (comment)?
FWIW, commit kleisauke@4ed9ec0 causes an ABI break, so I think this will not be included in GLib 2.0.