add mem_stream_make_raw

This commit is contained in:
Eric House 2018-06-27 23:24:14 -07:00
parent 9cdd5a7b72
commit 976db7b181
3 changed files with 10 additions and 3 deletions

View file

@ -66,6 +66,12 @@ static StreamCtxVTable* make_vtable( MemStreamCtxt* stream );
/* Try to keep this the only entry point to this file, and to keep it at the
* top of the file (first executable code).
*/
XWStreamCtxt*
mem_stream_make_raw( MPFORMAL VTableMgr* vtmgr )
{
return mem_stream_make( MPPARM(mpool) vtmgr, NULL, 0, NULL );
}
XWStreamCtxt*
mem_stream_make( MPFORMAL VTableMgr* vtmgr, void* closure,
XP_PlayerAddr channelNo, MemStreamCloseCallback onClose )

View file

@ -32,6 +32,8 @@ extern "C" {
typedef void (*MemStreamCloseCallback)( XWStreamCtxt* stream,
void* closure );
XWStreamCtxt* mem_stream_make_raw( MPFORMAL VTableMgr* vtmgr);
XWStreamCtxt* mem_stream_make( MPFORMAL VTableMgr* vtmgr,
void* closure,
XP_PlayerAddr addr, /* should be in a

View file

@ -248,9 +248,8 @@ parseAndDispatch( LaunchParams* params, uint8_t* buf, int len,
CommsAddrRec* addr )
{
LinSMSData* storage = getStorage( params );
XWStreamCtxt* stream = mem_stream_make( MPPARM(params->mpool)
params->vtMgr,
NULL, CHANNEL_NONE, NULL );
XWStreamCtxt* stream = mem_stream_make_raw( MPPARM(params->mpool)
params->vtMgr );
stream_setVersion( stream, CUR_STREAM_VERS );
stream_putBytes( stream, buf, len );