Skip to content

Commit

Permalink
allow stream_copy to copy blobs
Browse files Browse the repository at this point in the history
  • Loading branch information
dalnefre committed Jan 30, 2025
1 parent 362a544 commit 9e8ec00
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/blob_io.asm
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,16 @@ stream_copy: ; cb,out,in <- result
if stream_end ; --

msg -1 ; value
typeq #fixnum_t ; is_fix(value)
if stream_write ; --
eq #? ; value==#?
if stream_read ; --

stream_write: ; --
msg -1 ; value
actor self ; value callback=SELF
push #? ; value callback to_cancel=#?
pair 2 ; req=to_cancel,callback,value
state 2 ; req out
ref std.send_msg

stream_read: ; --
push #? ; #?
Expand All @@ -343,14 +351,6 @@ stream_read: ; --
state -2 ; req in
ref std.send_msg

stream_write: ; --
msg -1 ; char
actor self ; char callback=SELF
push #? ; char callback to_cancel=#?
pair 2 ; req=to_cancel,callback,char
state 2 ; req out
ref std.send_msg

stream_end: ; --
msg 0 ; result
state 1 ; result cb
Expand Down

0 comments on commit 9e8ec00

Please sign in to comment.