Skip to content

Commit

Permalink
some _Py
Browse files Browse the repository at this point in the history
  • Loading branch information
amilsted authored Mar 18, 2024
1 parent d001fe6 commit 9594752
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Compat/gui.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function init_gui()
pycopy!(new_event_loop_callback, g["new_event_loop_callback"])

# add a hook to automatically call fix_qt_plugin_path()
fixqthook = Py(() -> (_Py.CONFIG.auto_fix_qt_plugin_path && fix_qt_plugin_path(); nothing))
fixqthook = Py(() -> (Core.CONFIG.auto_fix_qt_plugin_path && fix_qt_plugin_path(); nothing))
pymodulehooks.add_hook("PyQt4", fixqthook)
pymodulehooks.add_hook("PyQt5", fixqthook)
pymodulehooks.add_hook("PySide", fixqthook)
Expand Down
2 changes: 1 addition & 1 deletion src/Compat/pycall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function init_pycall(PyCall::Module)
- Set the environment variable `PYTHON` to `PythonCall.C.CTX.exe_path` and rebuild PyCall. This forces PyCall
to use the same interpreter as PythonCall, but needs to be repeated whenever you switch Julia environment.
"""
@eval function _Py.Py(x::$PyCall.PyObject)
@eval function Core.Py(x::$PyCall.PyObject)
C.CTX.matches_pycall::Bool || error($errmsg)
return pynew(C.PyPtr($PyCall.pyreturn(x)))
end
Expand Down
2 changes: 1 addition & 1 deletion src/JlWrap/objectarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PyObjectArray(undef::UndefInitializer, dims::Vararg{Integer,N}) where {N} = PyOb
PyObjectArray{N}(x::AbstractArray{T,N}) where {T,N} = copyto!(PyObjectArray{N}(undef, size(x)), x)
PyObjectArray(x::AbstractArray{T,N}) where {T,N} = PyObjectArray{N}(x)

pyobjectarray_finalizer(x::PyObjectArray) = _Py.GC.enqueue_all(x.ptrs)
pyobjectarray_finalizer(x::PyObjectArray) = GC.enqueue_all(x.ptrs)

Base.IndexStyle(x::PyObjectArray) = Base.IndexStyle(x.ptrs)

Expand Down

0 comments on commit 9594752

Please sign in to comment.