pike.git / src / post_modules / Shuffler / e_source_block_pikestream.c

version» Context lines:

pike.git/src/post_modules/Shuffler/e_source_block_pikestream.c:41:    len = s->len;    s->s.eof = 1;    }       do {    struct pike_string *st;       push_int( len );    apply( s->obj, "read", 1 );    -  if(Pike_sp[-1].type != PIKE_T_STRING +  if(TYPEOF(Pike_sp[-1]) != PIKE_T_STRING    || !(st = Pike_sp[-1].u.string)->len) {    pop_stack();    break;    }       if( st->len < s->skip )    s->skip -= st->len;    else {    res.data = malloc(st->len -= s->skip);    memcpy(res.data, st->str+s->skip, res.len = st->len);
pike.git/src/post_modules/Shuffler/e_source_block_pikestream.c:75:   static void free_source( struct source *src )   {    free_object(((struct pf_source *)src)->obj);   }      struct source *source_block_pikestream_make( struct svalue *s,    INT64 start, INT64 len )   {    struct pf_source *res;    -  if( (s->type != PIKE_T_OBJECT) || +  if( (TYPEOF(*s) != PIKE_T_OBJECT) ||    (find_identifier("read",s->u.object->prog)==-1) )    return 0;       res = malloc( sizeof( struct pf_source ) );    MEMSET( res, 0, sizeof( struct pf_source ) );       res->len = len;    res->skip = start;       res->s.get_data = get_data;