Well, we have a REPL. It blows up horribly, but we have one.
This commit is contained in:
parent
4efe9eab87
commit
cf05e30540
19 changed files with 422 additions and 144 deletions
36
src/c/payloads/write_stream.c
Normal file
36
src/c/payloads/write_stream.c
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* payloads/read_stream.c
|
||||
*
|
||||
* A read stream.
|
||||
*
|
||||
* (c) 2026 Simon Brooke <simon@journeyman.cc>
|
||||
* Licensed under GPL version 2.0, or, at your option, any later version.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include "io/fopen.h"
|
||||
#include "memory/pointer.h"
|
||||
#include "memory/pso.h"
|
||||
#include "memory/pso2.h"
|
||||
#include "memory/tags.h"
|
||||
|
||||
|
||||
/**
|
||||
* Construct a cell which points to a stream open for writing.
|
||||
* @param input the C stream to wrap.
|
||||
* @param metadata a pointer to an associaton containing metadata on the stream.
|
||||
* @return a pointer to the new read stream.
|
||||
*/
|
||||
struct pso_pointer make_write_stream( URL_FILE *output,
|
||||
struct pso_pointer metadata ) {
|
||||
struct pso_pointer pointer = allocate( WRITETAG, 2 );
|
||||
struct pso2 *cell = pointer_to_object( pointer );
|
||||
|
||||
cell->payload.stream.stream = output;
|
||||
cell->payload.stream.meta = metadata;
|
||||
|
||||
return pointer;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue