Skip to content

Commit 4fbae08

Browse files
author
GueLaKais
committed
Added comments to Function
To be honest, I still don't understand exactly what's happening here. All I know is that it's at least somewhat understandable what's going on here.
1 parent 0ee9a7f commit 4fbae08

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rosidl_runtime_rs/src/sequence.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,16 @@ macro_rules! impl_sequence_alloc_for_primitive_type {
559559
ret
560560
}
561561
}
562+
/// Finalizes a sequence, freeing any associated resources.
563+
///
564+
/// # Safety
565+
///
566+
/// This function is unsafe because it calls an unsafe function `$fini_func`.
567+
/// The caller must ensure that `$fini_func` is safe to call with the provided arguments.
568+
///
569+
/// # Arguments
570+
///
571+
/// * `seq` - A mutable reference to the sequence to be finalized.
562572
fn sequence_fini(seq: &mut Sequence<Self>) {
563573
// SAFETY: There are no special preconditions to the sequence_fini function.
564574
unsafe { $fini_func(seq as *mut _) }

0 commit comments

Comments
 (0)