clone and free with :: syntax
This commit is contained in:
parent
9756ef39b7
commit
514c0304b8
15 changed files with 59 additions and 59 deletions
|
@ -45,8 +45,8 @@ pub unsafe extern "C" fn sp_cmd_bitmap_try_into_packet(
|
|||
heap_move_ok(unsafe { heap_remove(command) }.try_into())
|
||||
}
|
||||
|
||||
wrap_clone!(BitmapCommand, sp_cmd_bitmap);
|
||||
wrap_free!(BitmapCommand, sp_cmd_bitmap);
|
||||
wrap_clone!(sp_cmd_bitmap::BitmapCommand);
|
||||
wrap_free!(sp_cmd_bitmap::BitmapCommand);
|
||||
|
||||
/// Returns a pointer to the provided `BitmapCommand`.
|
||||
///
|
||||
|
|
|
@ -45,8 +45,8 @@ pub unsafe extern "C" fn sp_cmd_bitvec_try_into_packet(
|
|||
heap_move_ok(unsafe { heap_remove(command) }.try_into())
|
||||
}
|
||||
|
||||
wrap_clone!(BitVecCommand, sp_cmd_bitvec);
|
||||
wrap_free!(BitVecCommand, sp_cmd_bitvec);
|
||||
wrap_clone!(sp_cmd_bitvec::BitVecCommand);
|
||||
wrap_free!(sp_cmd_bitvec::BitVecCommand);
|
||||
|
||||
/// Returns a pointer to the [BitVec] contained in the [BitVecCommand].
|
||||
#[no_mangle]
|
||||
|
|
|
@ -41,8 +41,8 @@ pub unsafe extern "C" fn sp_cmd_brightness_grid_into_packet(
|
|||
heap_move_ok(unsafe { heap_remove(command) }.try_into())
|
||||
}
|
||||
|
||||
wrap_clone!(BrightnessGridCommand, sp_cmd_brightness_grid);
|
||||
wrap_free!(BrightnessGridCommand, sp_cmd_brightness_grid);
|
||||
wrap_clone!(sp_cmd_brightness_grid::BrightnessGridCommand);
|
||||
wrap_free!(sp_cmd_brightness_grid::BrightnessGridCommand);
|
||||
|
||||
/// Moves the provided [BrightnessGrid] to be contained in the [BrightnessGridCommand].
|
||||
#[no_mangle]
|
||||
|
|
|
@ -12,7 +12,7 @@ pub unsafe extern "C" fn sp_cmd_clear_new() -> NonNull<ClearCommand> {
|
|||
heap_move_nonnull(ClearCommand)
|
||||
}
|
||||
|
||||
wrap_free!(ClearCommand, sp_cmd_clear);
|
||||
wrap_free!(sp_cmd_clear::ClearCommand);
|
||||
|
||||
/// Kills the udp daemon on the display, which usually results in a restart.
|
||||
///
|
||||
|
@ -24,7 +24,7 @@ pub unsafe extern "C" fn sp_cmd_hard_reset_new() -> NonNull<HardResetCommand> {
|
|||
heap_move_nonnull(HardResetCommand)
|
||||
}
|
||||
|
||||
wrap_free!(HardResetCommand, sp_cmd_hard_reset);
|
||||
wrap_free!(sp_cmd_hard_reset::HardResetCommand);
|
||||
|
||||
/// A yet-to-be-tested command.
|
||||
///
|
||||
|
@ -34,4 +34,4 @@ pub unsafe extern "C" fn sp_cmd_fade_out_new() -> NonNull<FadeOutCommand> {
|
|||
heap_move_nonnull(FadeOutCommand)
|
||||
}
|
||||
|
||||
wrap_free!(FadeOutCommand, sp_cmd_fade_out);
|
||||
wrap_free!(sp_cmd_fade_out::FadeOutCommand);
|
||||
|
|
|
@ -41,8 +41,8 @@ pub unsafe extern "C" fn sp_cmd_char_grid_try_into_packet(
|
|||
heap_move_ok(unsafe { heap_remove(command) }.try_into())
|
||||
}
|
||||
|
||||
wrap_clone!(CharGridCommand, sp_cmd_char_grid);
|
||||
wrap_free!(CharGridCommand, sp_cmd_char_grid);
|
||||
wrap_clone!(sp_cmd_char_grid::CharGridCommand);
|
||||
wrap_free!(sp_cmd_char_grid::CharGridCommand);
|
||||
|
||||
/// Moves the provided [CharGrid] to be contained in the [CharGridCommand].
|
||||
#[no_mangle]
|
||||
|
|
|
@ -41,8 +41,8 @@ pub unsafe extern "C" fn sp_cmd_cp437_grid_try_into_packet(
|
|||
heap_move_ok(unsafe { heap_remove(command) }.try_into())
|
||||
}
|
||||
|
||||
wrap_clone!(Cp437GridCommand, sp_cmd_cp437_grid);
|
||||
wrap_free!(Cp437GridCommand, sp_cmd_cp437_grid);
|
||||
wrap_clone!(sp_cmd_cp437_grid::Cp437GridCommand);
|
||||
wrap_free!(sp_cmd_cp437_grid::Cp437GridCommand);
|
||||
|
||||
/// Moves the provided bitmap into the provided command.
|
||||
///
|
||||
|
|
|
@ -22,8 +22,8 @@ pub unsafe extern "C" fn sp_cmd_brightness_global_into_packet(
|
|||
heap_move_nonnull(unsafe { heap_remove(command) }.into())
|
||||
}
|
||||
|
||||
wrap_clone!(GlobalBrightnessCommand, sp_cmd_brightness_global);
|
||||
wrap_free!(GlobalBrightnessCommand, sp_cmd_brightness_global);
|
||||
wrap_clone!(sp_cmd_brightness_global::GlobalBrightnessCommand);
|
||||
wrap_free!(sp_cmd_brightness_global::GlobalBrightnessCommand);
|
||||
|
||||
/// Moves the provided bitmap to be contained in the command.
|
||||
#[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue