-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathJlWrap.jl
More file actions
57 lines (50 loc) · 1.42 KB
/
JlWrap.jl
File metadata and controls
57 lines (50 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""
module PythonCall.JlWrap
Defines the Python object wrappers around Julia objects (`juliacall.AnyValue` etc).
"""
module JlWrap
using ..PythonCall: PythonCall
using ..Core
using ..Core: C, Utils, pynew, @autopy, incref, decref, setptr!, getptr, pyjuliacallmodule, pycopy!, errcheck, errset, PyNULL, pyistuple, pyisnull, pyJuliaError, pydel!, pyistype, pytypecheck, pythrow, pytuple_getitem, pyisslice, pystr_asstring, pyosmodule, pyisstr
using ..Convert: pyconvert, @pyconvert, PYCONVERT_PRIORITY_WRAP, pyconvert_add_rule, pyconvert_tryconvert, pyconvertarg, pyconvert_result
using Base: @propagate_inbounds, allocatedinline
import ..Core: Py
include("C.jl")
include("base.jl")
include("raw.jl")
include("any.jl")
include("iter.jl")
include("type.jl")
include("module.jl")
include("io.jl")
include("number.jl")
include("objectarray.jl")
include("array.jl")
include("vector.jl")
include("dict.jl")
include("set.jl")
include("callback.jl")
function __init__()
Cjl.C.with_gil() do
init_base()
init_raw()
init_any()
init_iter()
init_type()
init_module()
init_io()
init_number()
init_array()
init_vector()
init_dict()
init_set()
init_callback()
# add packages to juliacall
jl = pyjuliacallmodule
jl.Core = Base.Core
jl.Base = Base
jl.Main = Main
jl.PythonCall = PythonCall
end
end
end