[julia-users] JL_GC_PUSH* macro inconsistency?

2015-03-27 Thread Philip Roth
I'm embedding calls to Julia code within other languages, and have noticed what I think is an inconsistency in the implementation of the JL_GC_PUSH* macros. With the JL_GC_PUSH1, JL_GC_PUSH2, etc. macros, the documentation on embedding shows to pass the *address* of the jl_value_t pointer vari

Re: [julia-users] JL_GC_PUSH* macro inconsistency?

2015-03-27 Thread Jameson Nash
The documentation is correct. And these macros exist for different purposes, which is why they are defined differently. `JL_GC_PUSHARGS` allocates gc-rooted space and stores a reference to it in the first argument. `JL_GC_PUSH` does not allocate space, it instead takes the address(es) of existing v

Re: [julia-users] JL_GC_PUSH* macro inconsistency?

2015-04-09 Thread Philip Roth
Thanks for the response. I see that they both result in a GC stack frame on the program's stack and that the GC determines whether the frame holds the addresses to the variables or pointers to those addresses based on whether the first entry in the frame is even or odd. On Friday, March 27,