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

version» Context lines:

pike.git/src/post_modules/Shuffler/d_source_pikestream.c:130:   }      static void f_got_data( INT32 args )   {    struct pf_source *s =    ((struct callback_prog *)Pike_fp->current_object->storage)->s;       remove_callbacks( (struct source *)s );       if( s->str || -  Pike_sp[-1].type != PIKE_T_STRING || +  TYPEOF(Pike_sp[-1]) != PIKE_T_STRING ||    Pike_sp[-1].u.string->size_shift ||    Pike_sp[-1].u.string->len == 0)    {    s->s.eof = 1;    pop_n_elems(args);    push_int(0);    return;    }    s->str = Pike_sp[-1].u.string;    Pike_sp--;
pike.git/src/post_modules/Shuffler/d_source_pikestream.c:160:    struct pf_source *s = (struct pf_source *)src;    s->when_data_cb = cb;    s->when_data_cb_arg = a;   }      struct source *source_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("set_read_callback",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;