Branch: Tag:

2008-06-23

2008-06-23 16:02:25 by Martin Stjernholm <mast@lysator.liu.se>

Expose the object pointer in SearchMojt to allow the caller to make it known
to the gc.

Rev: src/pike_search.c:1.30
Rev: src/pike_search.h:1.10
Rev: src/pike_search_engine.c:1.14

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_search.h,v 1.9 2004/09/18 20:19:15 per Exp $ + || $Id: pike_search.h,v 1.10 2008/06/23 16:02:25 mast Exp $   */      #ifndef PIKE_SEARCH_H
22:      struct hubbe_searcher   { -  struct object *o; /* must be first */ +     void *needle;    ptrdiff_t needlelen;   
33:      struct boyer_moore_hubbe_searcher   { -  struct object *o; /* must be first */ +     void *needle;    ptrdiff_t needlelen;   
59:    SearchMojtFunc1 func1;    SearchMojtFunc2 func2;    SearchMojtFuncN funcN; -  void (*freeme)(void *); +    };      typedef struct SearchMojt   {    const struct SearchMojtVtable *vtab;    void *data; -  +  struct object *container; /* Refcounted if non-NULL. */   } SearchMojt;      struct pike_mem_searcher   { -  SearchMojt mojt; +  SearchMojt mojt; /* Exception: mojt.container not refcounted here. */    struct pike_string *s; /* search string */    union memsearcher_data    {