RFC: extend unsafe_assign to work for any isbits type, add pointer_from_objref #2515

Merged
merged 3 commits into from Mar 8, 2013

Conversation

Projects
None yet
2 participants
@stevengj
Member

stevengj commented Mar 8, 2013

The attached patch modifies the pointerset and pointerref intrinsics to check isbits rather than is_bitstype, so that they use the same code for any pointer-free immutable type.

It also adds a pointer_from_objref function which is the inverse of unsafe_pointer_to_objref.

Both of these functions are motivated by the desire to be able to store jl_value_t* pointers in a C struct given a pointer to the latter, as discussed on julia-dev.

JeffBezanson added a commit that referenced this pull request Mar 8, 2013

Merge pull request #2515 from stevengj/unsafe_immutable
RFC: extend unsafe_assign to work for any isbits type, add pointer_from_objref

@JeffBezanson JeffBezanson merged commit 645a65d into JuliaLang:master Mar 8, 2013

1 check passed

default The Travis build passed
Details

@stevengj stevengj referenced this pull request Mar 16, 2013

Closed

0.2 release notes #2581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment