Skip to content

Don't use jl_value_ptr#267

Merged
randy3k merged 1 commit intomasterfrom
sb/callback-ref
Aug 28, 2018
Merged

Don't use jl_value_ptr#267
randy3k merged 1 commit intomasterfrom
sb/callback-ref

Conversation

@simonbyrne
Copy link
Copy Markdown
Member

Wrap immutable objects in a Ref to avoid the jl_value_ptr problems

@randy3k
Copy link
Copy Markdown
Member

randy3k commented Aug 27, 2018

Thanks

@simonbyrne
Copy link
Copy Markdown
Member Author

I'm not 100% sure how necessary this is, but probably better to be on the safe side.

Wrap objects in a Ref to avoid immutable relocation problems.
@simonbyrne
Copy link
Copy Markdown
Member Author

@yuyichao Is this handling of function callbacks correct? Or is there a better way we should be doing this?

@yuyichao
Copy link
Copy Markdown

Looks correct. A better way, if the performance of the callback is important, would be to do sth similar to JuliaMath/Cubature.jl#23 to allow specialization of the callback.

@randy3k randy3k merged commit 1cd057e into master Aug 28, 2018
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.

3 participants