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:85:    struct pf_source *s = (struct pf_source *)src;    frees(s);    free_object(s->obj);   }      struct source *source_block_pikestream_make( struct svalue *s,    INT64 start, INT64 len )   {    struct pf_source *res;    -  if( (TYPEOF(*s) != PIKE_T_OBJECT) || -  (find_identifier("read",s->u.object->prog)==-1) ) +  if (TYPEOF(*s) != PIKE_T_OBJECT +  || find_identifier("read",s->u.object->prog) < 0)    return 0;    -  res = calloc( 1, sizeof( struct pf_source ) ); -  if( !res ) return NULL; +  if (!(res = calloc(1, sizeof(struct pf_source)))) +  return 0;       res->str = 0;    res->len = len;    res->skip = start;       res->s.get_data = get_data;    res->s.free_source = free_source;    res->obj = s->u.object;    add_ref(res->obj);    return (struct source *)res;   }      void source_block_pikestream_exit( )   {   }      void source_block_pikestream_init( )   {   }