mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
add mem_stream_make_raw
This commit is contained in:
parent
9cdd5a7b72
commit
976db7b181
3 changed files with 10 additions and 3 deletions
|
@ -67,6 +67,12 @@ static StreamCtxVTable* make_vtable( MemStreamCtxt* stream );
|
|||
* 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 )
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue