[julia-users] Re: Replacement for jl_gc_preserve() and jl_gc_unpreserve()?

2016-08-10 Thread Kit Adams
gt; > On Wednesday, August 10, 2016 at 6:57:15 AM UTC, Kit Adams wrote: >> >> I am investigating the feasibility of embedding Julia in a C++ real-time >> signal processing framework, using Julia-0.4.6 (BTW, the performance is >> looking amazing). >> > > T

Re: [julia-users] Replacement for jl_gc_preserve() and jl_gc_unpreserve()?

2016-08-10 Thread Kit Adams
mmediately. On Wednesday, August 10, 2016 at 11:06:23 PM UTC+12, Bart Janssens wrote: > > On Wed, Aug 10, 2016 at 11:46 AM Kit Adams > wrote: > >> Thank you for those links, they are a great help. >> >> Is there an "unprotect_from_gc(T* val)"? >

Re: [julia-users] Replacement for jl_gc_preserve() and jl_gc_unpreserve()?

2016-08-10 Thread Kit Adams
I guess I could try using std::remove() followed by jl_array_del_end() to remove entries. Cheers, Kit On Wednesday, August 10, 2016 at 9:45:55 PM UTC+12, Kit Adams wrote: > > Thank you for those links, they are a great help. > > Is there an "unprotect_from_gc(T* val)"?

Re: [julia-users] Replacement for jl_gc_preserve() and jl_gc_unpreserve()?

2016-08-10 Thread Kit Adams
nter's dtor). Thanks, Kit On Wednesday, August 10, 2016 at 8:10:34 PM UTC+12, Bart Janssens wrote: > > > > On Wed, Aug 10, 2016 at 9:11 AM Yichao Yu > > wrote: > >> On Wed, Aug 10, 2016 at 2:17 PM, Kit Adams > > wrote: >> >>> I am inves

[julia-users] Replacement for jl_gc_preserve() and jl_gc_unpreserve()?

2016-08-09 Thread Kit Adams
I am investigating the feasibility of embedding Julia in a C++ real-time signal processing framework, using Julia-0.4.6 (BTW, the performance is looking amazing). However, for this usage I need to retain Julia state variables across c++ function calls, so the stack based JL_GC_PUSH() and JL_GC_

[julia-users] Re: Embedding julia in VC++ app - crash in jl_init()

2016-08-02 Thread Kit Adams
Many thanks for these helpful pointers, which led me to this: https://node-julia.readme.io/docs/the-windows-situation Linking against a libopenlibm.lib import library created manually from libopenlibm.dll using dumpbin and lib fixed the crash. Also, in looking to link against libjulia-debug, I

[julia-users] Embedding julia in VC++ app - crash in jl_init()

2016-08-02 Thread Kit Adams
Hi, I am investigating embedding julia in a Windows app built using Visual Studio 2012. I installed the julia-0.4.6 binaries, made an import library (libjulia.lib) from the libjulia.dll using dumpbin and lib. I linked a vc++ console app (based on examples/embedding.c) against libjulia.lib. I