Skip to content

Commit

Permalink
Updated version number in Project.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
eswagel committed Jul 29, 2024
1 parent 419e4cf commit 706051b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SymbolicsMathLink"
uuid = "7963cd39-1b62-4514-9cf0-788fb5452611"
authors = ["E. Swagel"]
version = "1.0.1"
version = "2.0.0"

[deps]
MathLink = "18c93696-a329-5786-9845-8443133fa0b4"
Expand Down
12 changes: 8 additions & 4 deletions src/wcall.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
function wcall(returnJulia::Union{Val{true}, Val{false}}, head::AbstractString, args...; kwargs...)
"""
wcall([returnJulia::Val{bool},] head::AbstractString, args...; returnJulia=Val(true), kwargs...)
Expand All @@ -24,12 +25,15 @@
-1 - x
```
"""
function wcall(::Val{false}, head::AbstractString, args...; kwargs...)
mathematica_result = wcall(head, args...; kwargs...)
return convert_to_julia(mathematica_result)

return wcall(returnJulia, head, expr_to_mathematica.(args)...; kwargs...)
end
wcall(::Val{true}, head::AbstractString, args::Vararg{Mtypes}; kwargs...) = begin
mathematica_result = wcall(Val(false), head, args...; kwargs...)
return mathematica_to_expr(mathematica_result)
end

wcall(::Val{true}, head::AbstractString, args...; kwargs...)=begin
wcall(::Val{false}, head::AbstractString, args::Vararg{Mtypes}; kwargs...) = begin
return weval(MathLink.WSymbol(head)(args...; kwargs...))
end

Expand Down

0 comments on commit 706051b

Please sign in to comment.