aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--julia/CrystFEL/src/reflists.jl9
-rw-r--r--julia/CrystFEL/src/symmetry.jl4
2 files changed, 7 insertions, 6 deletions
diff --git a/julia/CrystFEL/src/reflists.jl b/julia/CrystFEL/src/reflists.jl
index e1766f83..6629b186 100644
--- a/julia/CrystFEL/src/reflists.jl
+++ b/julia/CrystFEL/src/reflists.jl
@@ -93,11 +93,12 @@ Base.length(reflist::RefList) = ccall((:num_reflections, libcrystfel),
Cint, (Ptr{InternalRefList},), reflist.internalptr)
-function Base.getindex(reflist::RefList{T}, h, k, l) where T
+function Base.getindex(reflist::RefList{T}, indices) where T
- refl = ccall((:find_refl, libcrystfel),
- Ptr{InternalReflection}, (Ptr{InternalRefList},Cint,Cint,Cint),
- reflist.internalptr, h, k, l)
+ refl = @ccall libcrystfel.find_refl(reflist.internalptr::Ptr{InternalRefList},
+ indices[1]::Cint,
+ indices[2]::Cint,
+ indices[3]::Cint)::Ptr{InternalReflection}
if refl == C_NULL
return nothing
diff --git a/julia/CrystFEL/src/symmetry.jl b/julia/CrystFEL/src/symmetry.jl
index d6d2e477..4b4caa4d 100644
--- a/julia/CrystFEL/src/symmetry.jl
+++ b/julia/CrystFEL/src/symmetry.jl
@@ -100,12 +100,12 @@ function Base.iterate(sym::SymOpList, i)
end
-function asymmetricindices(sym::SymOpList, h, k, l)
+function asymmetricindices(sym::SymOpList, indices)
ho = Ref{Cint}(0)
ko = Ref{Cint}(0)
lo = Ref{Cint}(0)
@ccall libcrystfel.get_asymm(sym.internalptr::Ptr{InternalSymOpList},
- h::Cint, k::Cint, l::Cint,
+ indices[1]::Cint, indices[2]::Cint, indices[3]::Cint,
ho::Ref{Cint}, ko::Ref{Cint}, lo::Ref{Cint})::Cvoid
(ho[], ko[], lo[])
end