Skip to content

Fix the build on apple-apple-apple by casting IMPs correctly. - #2

Open
iamleeg wants to merge 2 commits into
gnustep:masterfrom
iamleeg:fix-imp-casts
Open

Fix the build on apple-apple-apple by casting IMPs correctly.#2
iamleeg wants to merge 2 commits into
gnustep:masterfrom
iamleeg:fix-imp-casts

Conversation

@iamleeg

@iamleeg iamleeg commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Recent versions of the Apple ObjC runtime define IMP as void (*IMP)(void), and the compiler rejects attempts to use functions without casting to a type that matches the signature used at the call site. This PR adds those casts to gdl2. Additionally, it uses the Objective-C runtime API to manipulate an object's class, because the isa member isn't available on all runtimes.

Signed-off-by: Graham Lee <grahamlee@acm.org>
@dwetzel72

Copy link
Copy Markdown
Contributor

I think we do not really need IMP caching. we should remove this to make the code more readable. What do you think @iamleeg

Signed-off-by: Graham Lee <grahamlee@acm.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants