MAT.jl icon indicating copy to clipboard operation
MAT.jl copied to clipboard

Improve `CompositeKind` handling

Open BambOoxX opened this issue 3 years ago • 3 comments

The current behavior for CompositeKind data is https://github.com/JuliaIO/MAT.jl/blob/355bd1a901730ad5713b3283f6ec66603c72dfd9/src/MAT_HDF5.jl#L529-L536

however, there are issues with the isbits(s) test, reported in #162,#143 or with simple user types such as

struct MyType
    field1::Int64
    field2::Int64
end

While these types are clearly isbitstypes, I do not see a reason to not allow their conversion the equivalent matlab struct. Given https://github.com/JuliaIO/MAT.jl/blob/355bd1a901730ad5713b3283f6ec66603c72dfd9/src/MAT_HDF5.jl#L535 The requirement seems more to be that fieldcount(T) > 0, regardless of the actual bits type.

Can someone confirm this ?

BambOoxX avatar Apr 25 '22 11:04 BambOoxX

Bump ?

BambOoxX avatar Mar 25 '24 09:03 BambOoxX