Commit Graph

3 Commits

Author SHA1 Message Date
Dan Balasescu 913afa5b4f
Refactorings + auto styling 2024-04-07 12:47:29 +09:00
Susko3 91cef07624 Add friendly `string?` overloads to C `(const) char *` functions
This is done by adding a `Unsafe_` prefix to `(const) char *` (C# `byte*`) functions.
I am using `string?` instead of `ReadOnlyMemory<byte>?` because the returned pointer can
get invalidated and cause memory-safety issues.

The returned pointer is automatically freed if the return type is `char *`.
I've checked that the documentation for all functions (except in SDL_stdinc.h)
requires calling `SDL_free()` on the pointer.
2024-04-06 14:36:36 +02:00
Susko3 c5e3181962 Add source generator for `ReadOnlySpan<byte>` overloads of C `const char *` functions 2024-04-06 14:24:33 +02:00