Skip to content

Commit 056aba1

Browse files
committed
Mark unsafe.
1 parent 5896862 commit 056aba1

File tree

1 file changed

+3
-3
lines changed
  • crates/processing_ffi/src

1 file changed

+3
-3
lines changed

crates/processing_ffi/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ pub extern "C" fn processing_rect(
248248
/// - data is a valid pointer to data_len bytes of RGBA pixel data.
249249
/// - This is called from the same thread as init.
250250
#[unsafe(no_mangle)]
251-
pub extern "C" fn processing_image_create(
251+
pub unsafe extern "C" fn processing_image_create(
252252
width: u32,
253253
height: u32,
254254
data: *const u8,
@@ -279,7 +279,7 @@ pub extern "C" fn processing_image_create(
279279
/// Note: This function is currently synchronous but Bevy's asset loading is async.
280280
/// The image may not be immediately available. This needs to be improved.
281281
#[unsafe(no_mangle)]
282-
pub extern "C" fn processing_image_load(path: *const std::ffi::c_char) -> u64 {
282+
pub unsafe extern "C" fn processing_image_load(path: *const std::ffi::c_char) -> u64 {
283283
error::clear_error();
284284

285285
// SAFETY: Caller guarantees path is a valid C string
@@ -318,7 +318,7 @@ pub extern "C" fn processing_image_resize(image_id: u64, new_width: u32, new_hei
318318
/// - buffer_len must equal width * height of the image.
319319
/// - This is called from the same thread as init.
320320
#[unsafe(no_mangle)]
321-
pub extern "C" fn processing_image_load_pixels(
321+
pub unsafe extern "C" fn processing_image_load_pixels(
322322
image_id: u64,
323323
buffer: *mut Color,
324324
buffer_len: usize,

0 commit comments

Comments
 (0)