1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
pub use *;
/// Frees a heap-allocated buffer previously returned from Rust.
///
/// # Parameters
/// - `ptr`: Pointer to the buffer to free.
///
/// # Safety
/// - `ptr` must be a pointer previously returned from Rust (e.g., a buffer from `yad_as_buffer` or `row_as_buffer`) or null.
/// - After calling this function, `ptr` must not be used again to avoid undefined behavior.
///
/// # Example
/// ```c
/// const uint8_t* buf = yad_as_buffer(yad);
/// // ... use the buffer ...
/// free_buffer((uint8_t*)buf);
/// ```
pub extern "C"
/* Author: Johan | Date: 8/21/2025 11:15 PM
- Key functions
- Doc all functions lol
- Test lol
*/