add ability to send commands directly in C code, annotate which functions may return null

This commit is contained in:
Vinzenz Schroeter 2024-09-07 14:35:16 +02:00
commit acc35b6727
13 changed files with 138 additions and 29 deletions

View file

@ -51,6 +51,8 @@ pub unsafe extern "C" fn sp_cp437_grid_new(
/// Loads a `SPCp437Grid` with the specified dimensions from the provided data.
///
/// Will never return NULL.
///
/// # Panics
///
/// When the provided `data_length` is not sufficient for the `height` and `width`
@ -78,6 +80,8 @@ pub unsafe extern "C" fn sp_cp437_grid_load(
/// Clones a `SPCp437Grid`.
///
/// Will never return NULL.
///
/// # Safety
///
/// The caller has to make sure that:
@ -219,6 +223,8 @@ pub unsafe extern "C" fn sp_cp437_grid_height(
/// Gets an unsafe reference to the data of the `SPCp437Grid` instance.
///
/// Will never return NULL.
///
/// ## Safety
///
/// The caller has to make sure that: