JuliaIO / JLD2.jl

HDF5-compatible file format in pure Julia
Other
549 stars 85 forks source link

const fields in mutable structs #414

Closed JonasIsensee closed 2 years ago

JonasIsensee commented 2 years ago

This changes the reconstruction of mutable structs to use jl_set_nth_field instead of setfield!. The former does not appear to check the const property. Since we are only just creating the struct and no other place has access to it, yet, this should be fine.

closes #410

codecov[bot] commented 2 years ago

Codecov Report

Merging #414 (90cc06c) into master (a2dec21) will increase coverage by 0.07%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #414      +/-   ##
==========================================
+ Coverage   88.49%   88.57%   +0.07%     
==========================================
  Files          29       29              
  Lines        2894     2896       +2     
==========================================
+ Hits         2561     2565       +4     
+ Misses        333      331       -2     
Impacted Files Coverage Δ
src/data/reconstructing_datatypes.jl 77.37% <100.00%> (+0.75%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.