-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory stream create/delete #595
Comments
I'll look into this tomorrow as at the moment I'm a little hazy about all
that.
…On Wed, 18 Sept 2024, 23:14 guregu, ***@***.***> wrote:
Expand memory stream support (currently used by with_output_stream etc.)
a bit to allow creating more than one and name them. This is mainly useful
for the wasm stuff to capture output in a nested manner (e.g. run a program
that uses with_output_stream without clobbering it, building HTTP
responses and the like).
I have implemented this in my fork so it'd be a relatively easy feature to
port over here.
The biggest change is adding a "is this stream valid?" macro and using it
instead of checking against stream.fp in many places.
Here's what I currently have, but maybe a different naming scheme would be
better as it works a little differently than the is_* macros that take a
cell:
https://github.com/guregu/trealla/blob/78eef6f5ee2124b7dcd1f9e8e8567c8843e73f20/src/builtins.h#L61-L69
It this sounds like a good idea I'll make a PR.
—
Reply to this email directly, view it on GitHub
<#595>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFNKSERU5MSOCOFANRDJM63ZXF4EPAVCNFSM6AAAAABONVREYOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTGNZRGU4DOMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
infradig
added a commit
that referenced
this issue
Sep 23, 2024
Go ahead and do a PR and i'll look at that. |
I’ll prepare a PR sometime this week |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expand memory stream support (currently used by
with_output_stream
etc.) a bit to allow creating more than one and name them. This is mainly useful for the wasm stuff to capture output in a nested manner (e.g. run a program that useswith_output_stream
without clobbering it, building HTTP responses and the like).I have implemented this in my fork so it'd be a relatively easy feature to port over here.
The biggest change is adding a "is this stream valid?" macro and using it instead of checking against stream.fp in many places.
Here's what I currently have, but maybe a different naming scheme would be better as it works a little differently than the is_* macros that take a cell: https://github.com/guregu/trealla/blob/78eef6f5ee2124b7dcd1f9e8e8567c8843e73f20/src/builtins.h#L61-L69
It this sounds like a good idea I'll make a PR.
The text was updated successfully, but these errors were encountered: