Skip to content

Commit fd05c3e

Browse files
Merge pull request #87 from musm/tweakchar
Remove mxChar
2 parents 2202c9b + 065393a commit fd05c3e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/mxarray.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ typealias MxNum Union{MxRealNum, MxComplexNum}
6060

6161
typealias mwSize UInt
6262
typealias mwIndex Int
63-
typealias mxChar UInt16
6463
typealias mxClassID Cint
6564
typealias mxComplexity Cint
6665

@@ -643,7 +642,7 @@ function String(mx::MxArray)
643642
if !(classid(mx) == mxCHAR_CLASS && ((ndims(mx) == 2 && nrows(mx) == 1) || is_empty(mx)))
644643
throw(ArgumentError("String(mx::MxArray) only applies to strings (i.e. char vectors)"))
645644
end
646-
return transcode(String, unsafe_wrap(Array, Ptr{mxChar}(data_ptr(mx)), ncols(mx)))
645+
return transcode(String, unsafe_wrap(Array, Ptr{UInt16}(data_ptr(mx)), ncols(mx)))
647646
end
648647

649648
function Dict(mx::MxArray)

0 commit comments

Comments
 (0)