Sorry, the function is obviously called jl_symbol, not jl_sym
On Friday, September 5, 2014 11:15:16 AM UTC+2, Ivar Nesje wrote: > > I would guess that something like > > module = jl_eval_global_var > <https://github.com/JuliaLang/julia/blob/6277015ee3d46f20149136d092525bec95b6e29d/src/julia.h#L917> > (jl_main_module, jl_sym > <https://github.com/JuliaLang/julia/blob/6277015ee3d46f20149136d092525bec95b6e29d/src/julia.h#L666> > ("MyModule")) > > would work, but I don't have the required testing setup to see if it > actually works. (Where is my C REPL?) The embedding API has not gotten much > attention (yet), so it is mostly documented in source, and it is likely > that there will be some adjustments. > > > On Friday, September 5, 2014 10:09:03 AM UTC+2, Einar Otnes wrote: >> >> Sorry, I'm a bit slow. How do I look up a binding for a specific module? >> In other words, how would I explicitly get to call the "fftfreq" function >> in the "DSP" module from C/C++? >> >> Is this this documented anywhere in Julia docs? >> >> Thanks, >> Einar >> >> >> >> On Wednesday, September 3, 2014 3:10:59 PM UTC+2, Isaiah wrote: >>> >>> If you have defined a module already (by eval'ing julia code?) then you >>> can look up the binding and cast that to a jl_module_t. >>> On Sep 3, 2014 8:14 AM, "Einar Otnes" <eot...@gmail.com> wrote: >>> >>>> Dear experts, >>>> >>>> I've looking at the documentation " Embedding Julia" ( >>>> http://julia.readthedocs.org/en/latest/manual/embedding/) to figure >>>> out how I can call my own julia functions from within C, and I'm >>>> struggling >>>> to figure out how I should define the jl_module_t that corresponds the >>>> module I've defined. The examples show that there is an instance of >>>> jl_module_t, "jl_base_module", that you need to provide to be able to >>>> call a function defined in the base module. How do I define a >>>> corresponding >>>> jl_module_t type for the modules that are defined outside of standard >>>> julia, e.g. for the external packages or the modules I have created myself? >>>> >>>> Thanks for your help. >>>> >>>> Best regards, >>>> >>>> Einar Otnes >>>> >>>>