diff options
author | Thomas White <taw@physics.org> | 2024-01-16 10:33:06 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2024-02-06 16:59:35 +0100 |
commit | 57ed401c57e8a7548cb21d16495495446e070e13 (patch) | |
tree | 61d0f5497e882e33a2e1a8f61b238dbccd4df19d /julia/CrystFEL | |
parent | d0787517583955eb0d9391b1bd14764198e83903 (diff) |
Julia: Forbid non-deep copying of a PeakList
We cannot have two PeakList objects pointing at the same
underlying ImageFeatureList.
Diffstat (limited to 'julia/CrystFEL')
-rw-r--r-- | julia/CrystFEL/src/peaklist.jl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/julia/CrystFEL/src/peaklist.jl b/julia/CrystFEL/src/peaklist.jl index d4354977..9eedad27 100644 --- a/julia/CrystFEL/src/peaklist.jl +++ b/julia/CrystFEL/src/peaklist.jl @@ -30,6 +30,8 @@ function PeakList() end +Base.copy(::PeakList) = throw(ErrorException("Cannot copy(::PeakList), must deepcopy")) + function Base.deepcopy(peaklist::PeakList) out = @ccall libcrystfel.image_feature_list_copy(peaklist.internalptr::Ptr{InternalPeakList})::Ptr{InternalPeakList} if out == C_NULL |