Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for compatibility with v0.7.0-alpha.0 #133

Merged
merged 2 commits into from
Jun 13, 2018
Merged

Fixes for compatibility with v0.7.0-alpha.0 #133

merged 2 commits into from
Jun 13, 2018

Conversation

dawbarton
Copy link
Contributor

This PR brings compatibility with v0.7.0-alpha.0 while also maintaining compatibility with v0.6. Most of the changes are simple deprecation fixes.

A few points to note:

  • The new iteration protocol incurred a few changes (minor string processing).
  • To deal with changes to the AST of colons (e.g. x[1:3]) I've added :(:) to the MATLAB infix operators. As such, mstatement doesn't produce such nice output as before but it works without special casing. (For example mstatement(:(x[1:3])) == "x((1) : (3))" rather than "x(1:3)" as before.)
  • The mat_str macro now checks if an interpolated variable assignment is a ref (e.g., mat"$(x[1:3]) = 3"); in this case v0.7 requires that a broadcasted assignment is used explicitly.

Tests pass (on my machine at least) with v0.6.2 and v0.7.0-alpha.0.

src/MATLAB.jl Outdated
Base.depwarn("MATLAB.nfields is deprecated, use mxnfields instead.", :nfields)
return mxfields(mx)
end

@deprecate jvariable jvalue

function jvariable(mx::MxArray, ty::Type{AbstractString})
Base.depwarn("jvariable(mx::MxArray,ty::Type{AbstractString}) is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add back spaces to the depwarn

src/mxarray.jl Outdated
@@ -68,7 +68,7 @@ const mxCELL_CLASS = convert(mxClassID, 1)
const mxSTRUCT_CLASS = convert(mxClassID, 2)
const mxLOGICAL_CLASS = convert(mxClassID, 3)
const mxCHAR_CLASS = convert(mxClassID, 4)
const mxVOID_CLASS = convert(mxClassID, 5)
const mxCvoid_CLASS = convert(mxClassID, 5)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all caps please for Cvoid

@musm
Copy link
Collaborator

musm commented Jun 12, 2018

thanks!

@dawbarton
Copy link
Contributor Author

I've fixed the comments from the code review - hopefully all good to go now! 😃

@musm musm merged commit 5dfde10 into JuliaInterop:master Jun 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants