Skip to content

Deprecate intfstream_open_writable_memory#18216

Merged
LibretroAdmin merged 2 commits intolibretro:masterfrom
JoeOsborn:intfstream-memorystream-api
Aug 30, 2025
Merged

Deprecate intfstream_open_writable_memory#18216
LibretroAdmin merged 2 commits intolibretro:masterfrom
JoeOsborn:intfstream-memorystream-api

Conversation

@JoeOsborn
Copy link
Copy Markdown
Contributor

Having both functions is a bit of a footgun since intfstream_open_memory ignores the given mode and always opens with writable=false, while intfstream_open_writable_memory ignores the given mode and always opens with writable=true.

So, I rewrote the writable variant in terms of the other one, and deprecated it in the process. Now whether the memory is marked writable depends on the input mode for intfstream_open_memory, and the writable variant has the same behavior as before.

I also replaced the sole use of intfstream_open_writable_memory in the retroarch codebase, but I don't know whether any cores or other users of libretro-common used the function so it can't be removed completely.

The function is marked deprecated and rewritten in terms of `intfstream_open_memory`.
@LibretroAdmin LibretroAdmin merged commit 9b4168d into libretro:master Aug 30, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants