pike.git / src / pike_search_engine.c

version» Context lines:

pike.git/src/pike_search_engine.c:295:    struct pike_mem_searcher *s;    struct object *o;       if(!hashkey)    hashkey=NameN(make_shared_binary_string)(needle,len);    else    add_ref(hashkey);       if((sval=low_mapping_string_lookup(memsearch_cache,hashkey)))    { -  if(sval->type == T_OBJECT) +  if(TYPEOF(*sval) == T_OBJECT)    {    o=sval->u.object;    if(o->prog == pike_search_program)    {    s=OB2MSEARCH(sval->u.object);    assert (sval->u.object == s->mojt.container);    add_ref(sval->u.object);    free_string(hashkey);    return s->mojt;    }
pike.git/src/pike_search_engine.c:321:    s->mojt.container = o; /* Not refcounted self-ref. */    s->s=hashkey;       /* We use 0x7fffffff for max_haystacklen because we do    * not know how many times this search struct will be    * reused.    */    NameN(init_memsearch)(s,    needle,len,    0x7fffffff); -  stmp.type = T_OBJECT; -  stmp.subtype = 0; -  stmp.u.object = o; +  SET_SVAL(stmp, T_OBJECT, 0, object, o);       mapping_string_insert(memsearch_cache, hashkey, &stmp);       return s->mojt;    }   }