Skip to content

Commit

Permalink
bind seems to work
Browse files Browse the repository at this point in the history
  • Loading branch information
schlichtanders committed Jul 11, 2024
1 parent 9a9236f commit 536883c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JolinPluto"
uuid = "5b0b4ef8-f4e6-4363-b674-3f031f7b9530"
authors = ["Stephan Sahm <[email protected]> and contributors"]
version = "0.1.77"
version = "0.1.78"

[deps]
AbstractPlutoDingetjes = "6e696c72-6542-2067-7265-42206c756150"
Expand Down
2 changes: 1 addition & 1 deletion ext/PythonCallExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function JolinPluto.start_python_thread(func)
end


pyglobals() = get!(PythonCall.pydict, PythonCall.MODULE_GLOBALS, Main)
pyglobals() = get!(PythonCall.pydict, PythonCall.Core.MODULE_GLOBALS, Main)

JolinPluto.lang_enabled(::Val{:py}) = true
function JolinPluto.lang_copy_bind(::Val{:py}, def, value)
Expand Down
13 changes: 0 additions & 13 deletions src/languages.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# common things for both R and Python

# it turns out using a function variant of `bind` does not work well with using Pluto as a plain Julia file.
# because it might be in a nested module somewhere... and julia functions do not have access to its calling module because of possible inlining
# hence we need at least one macro call to get the module information
const _julia_module_where_plutoscript_is_included = Ref{Module}(Main)
macro init_jolin()
_julia_module_where_plutoscript_is_included[] = __module__
nothing
end

function init_jolin end


const _lang_bind_copy_functions = Function[]
lang_enabled(lang) = false
function lang_copy_bind end

Expand Down

0 comments on commit 536883c

Please sign in to comment.