File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -559,6 +559,7 @@ macro_rules! impl_sequence_alloc_for_primitive_type {
559559 ret
560560 }
561561 }
562+
562563 /// Finalizes a sequence, freeing any associated resources.
563564 ///
564565 /// # Safety
@@ -573,6 +574,22 @@ macro_rules! impl_sequence_alloc_for_primitive_type {
573574 // SAFETY: There are no special preconditions to the sequence_fini function.
574575 unsafe { $fini_func( seq as * mut _) }
575576 }
577+
578+ /// Copies the contents of one sequence to another.
579+ ///
580+ /// # Safety
581+ ///
582+ /// This function is unsafe because it calls an unsafe function `$copy_func`.
583+ /// The caller must ensure that `$copy_func` is safe to call with the provided arguments.
584+ ///
585+ /// # Arguments
586+ ///
587+ /// * `in_seq` - A reference to the sequence to be copied from.
588+ /// * `out_seq` - A mutable reference to the sequence to be copied to.
589+ ///
590+ /// # Returns
591+ ///
592+ /// `true` if the copy was successful, `false` otherwise.
576593 fn sequence_copy( in_seq: & Sequence <Self >, out_seq: & mut Sequence <Self >) -> bool {
577594 // SAFETY: There are no special preconditions to the sequence_copy function.
578595 unsafe { $copy_func( in_seq as * const _, out_seq as * mut _) }
You can’t perform that action at this time.
0 commit comments