Skip to content

Commit ea28692

Browse files
author
Christopher Doris
committed
add public bits of API back from comments
1 parent c45e86e commit ea28692

File tree

2 files changed

+36
-39
lines changed

2 files changed

+36
-39
lines changed

src/PythonCall.jl

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ include("api.jl")
44

55
module Internals
66

7-
const ROOT_DIR = dirname(@__DIR__)
8-
97
# include("Utils/Utils.jl")
108
include("C/C.jl")
119
include("GIL.jl")
@@ -19,40 +17,6 @@ include("GC.jl")
1917

2018
end
2119

22-
# # re-export everything
23-
# for m in [:Core, :Convert, :PyMacro, :Wrap, :JlWrap, :Compat]
24-
# for k in names(@eval($m))
25-
# if k != m
26-
# @eval using .$m: $k
27-
# @eval export $k
28-
# end
29-
# end
30-
# end
31-
32-
# # non-exported API
33-
# for k in
34-
# [:python_executable_path, :python_library_path, :python_library_handle, :python_version]
35-
# @eval using .C: $k
36-
# end
37-
# for k in [:pynew, :pyisnull, :pycopy!, :getptr, :pydel!, :unsafe_pynext, :PyNULL, :CONFIG]
38-
# @eval using .Core: $k
39-
# end
40-
# for k in [
41-
# :pyconvert_add_rule,
42-
# :pyconvert_return,
43-
# :pyconvert_unconverted,
44-
# :PYCONVERT_PRIORITY_WRAP,
45-
# :PYCONVERT_PRIORITY_ARRAY,
46-
# :PYCONVERT_PRIORITY_CANONICAL,
47-
# :PYCONVERT_PRIORITY_NORMAL,
48-
# :PYCONVERT_PRIORITY_FALLBACK,
49-
# ]
50-
# @eval using .Convert: $k
51-
# end
52-
# for k in [:event_loop_on, :event_loop_off, :fix_qt_plugin_path]
53-
# @eval using .Compat: $k
54-
# end
55-
5620
# # not API but used in tests
5721
# for k in [
5822
# :pyjlanytype,

src/api.jl

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,31 @@ end
1717

1818
const CONFIG = Config()
1919

20+
# exported functions
21+
for name in [:ispy]
22+
@eval function $name end
23+
@eval export $name
24+
end
25+
2026
# public functions
21-
for name in
22-
[:python_executable_path, :python_library_handle, :python_library_path, :python_version]
27+
for name in [
28+
:python_executable_path,
29+
:python_library_handle,
30+
:python_library_path,
31+
:python_version,
32+
:pynew,
33+
:pyisnull,
34+
:pycopy!,
35+
:getptr,
36+
:pydel!,
37+
:unsafe_pynext,
38+
:pyconvert_add_rule,
39+
:pyconvert_return,
40+
:pyconvert_unconverted,
41+
:event_loop_on,
42+
:event_loop_off,
43+
:fix_qt_plugin_path,
44+
]
2345
@eval function $name end
2446
if Base.VERSION v"1.11"
2547
eval(Expr(:public, name))
@@ -32,7 +54,18 @@ for name in [:Py, :PyException]
3254
end
3355

3456
# other public bindings
35-
for name in [:VERSION, :GIL, :GC, :CONFIG]
57+
for name in [
58+
:VERSION,
59+
:GIL,
60+
:GC,
61+
:CONFIG,
62+
# :PyNULL,
63+
# :PYCONVERT_PRIORITY_WRAP,
64+
# :PYCONVERT_PRIORITY_ARRAY,
65+
# :PYCONVERT_PRIORITY_CANONICAL,
66+
# :PYCONVERT_PRIORITY_NORMAL,
67+
# :PYCONVERT_PRIORITY_FALLBACK,
68+
]
3669
if Base.VERSION v"1.11"
3770
eval(Expr(:public, name))
3871
end

0 commit comments

Comments
 (0)