aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-12-22 11:49:12 +0100
committerThomas White <taw@physics.org>2024-02-06 16:59:35 +0100
commitf556b969f2c7147894a7a35a68440d522bfcd7c6 (patch)
tree2fbaf1bc009cd8813899ef056c102fab773ddcc4
parenta3327d917c411a2b6f59475fb0c9b2b36589f1ae (diff)
Julia: Write the DataTemplate to the stream
-rw-r--r--julia/CrystFEL/src/streams.jl4
1 files changed, 4 insertions, 0 deletions
diff --git a/julia/CrystFEL/src/streams.jl b/julia/CrystFEL/src/streams.jl
index d0b98f5f..29f0de5d 100644
--- a/julia/CrystFEL/src/streams.jl
+++ b/julia/CrystFEL/src/streams.jl
@@ -30,6 +30,10 @@ function Stream(filename, mode::AbstractString, dtempl::DataTemplate)
if out == C_NULL
throw(ErrorException("Failed to open stream for reading"))
end
+
+ @ccall libcrystfel.stream_write_data_template(out::Ptr{InternalStream},
+ dtempl.internalptr::Ptr{InternalDataTemplate})::Cvoid
+
finalizer(close, Stream(out))
elseif mode =="r"