Skip to content
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

Remove _self argument from block trampoline #42

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

tgymnich
Copy link
Contributor

The self argument is not part of the block calling convention [see clang docs]:(https://github.com/JuliaInterop/ObjectiveC.jl/blob/4e8cca652aabe009c90bc01ae92ae8ee87266c30/src/blocks.jl#L98)}

a. The invoke function pointer is set to a function that takes the Block structure as its first argument and the rest of the arguments (if any) to the Blockand executes the Block compound statement.

@tgymnich tgymnich changed the title Remove _self arguments from block trampoline Remove _self argument from block trampoline Sep 16, 2024
Copy link
Member

@maleadt maleadt left a comment

Choose a reason for hiding this comment

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

LGTM. I guess I was too focussed on implementationWithBlock when implementing this.

src/primitives.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
tgymnich and others added 2 commits September 17, 2024 09:55
Co-authored-by: Tim Besard <[email protected]>
Co-authored-by: Tim Besard <[email protected]>
@maleadt maleadt merged commit 5792950 into JuliaInterop:master Sep 17, 2024
5 checks passed
@tgymnich tgymnich deleted the fix-blocks branch October 9, 2024 19:45
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