Skip to content

Commit

Permalink
chore: Update to MathLink 0.5.2
Browse files Browse the repository at this point in the history
MathLink v0.5.2 introduced a few breaking changes as compared to 0.5.1,
see e.g.JuliaInterop/MathLink.jl#66.  Update to
account for them and set minimum version to 0.5.2.

Fixes: #27
  • Loading branch information
musoke committed Jan 15, 2024
1 parent 75ce5c4 commit 756ca3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ MathLink = "18c93696-a329-5786-9845-8443133fa0b4"
SyntaxTree = "a4af3ec5-f8ac-5fed-a759-c2e80b4d74cb"

[compat]
MathLink = "=0.5.1"
MathLink = "0.5.2"
SyntaxTree = "1.0.1"
julia = "1.8"
8 changes: 4 additions & 4 deletions src/WolframExpr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ Very shallow wrapper around `MathLink`'s parsing.
julia> using WolframExpr
julia> string_to_wexpr("Sin[1]")
W"Sin"(1)
W`Sin[1]`
```
"""
function string_to_wexpr(string)
MathLink.W`$string`
function string_to_wexpr(string)::Union{MathLink.WSymbol,MathLink.WExpr}
MathLink.parseexpr(string)
end

"""
Expand All @@ -84,7 +84,7 @@ Convert a Wolfram expression from a `MathLink.WExpr` to a Julia expression.
julia> using MathLink, WolframExpr
julia> wexpr_to_expr(W`1. + 1`)
:(1.0 + 1)
:(1.0 + 1.0)
```
"""
function wexpr_to_expr(symb::MathLink.WSymbol)
Expand Down

0 comments on commit 756ca3e

Please sign in to comment.