Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active October 20, 2016 04:31
Show Gist options
  • Save kjunichi/1f602f9c6f3ed491e1f1dfe26fa6d31e to your computer and use it in GitHub Desktop.
Save kjunichi/1f602f9c6f3ed491e1f1dfe26fa6d31e to your computer and use it in GitHub Desktop.

Python ctypes

from ctypes import *
mruby=CDLL('./libmruby.dylib',RTLD_GLOBAL)

mruby-julia

julia=CDLL('/Applications/Julia-0.4.5.app/Contents/Resources/julia/lib/julia/libjulia.dylib',RTLD_GLOBAL)

どうやってmrbの先頭アドレスを渡せるか

Julia側Cのポインタを受け取れる関数を用意

mrubyからこの関数にmrbをわたす

jl_get_function

これ、jl_base_module以外指定できるのか?

jl_module_t*型を用意できれば行けるのかも

その場でつくった関数は?

jl_current_module

関連

アクセス解析タグ

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