On Wed, 2009-08-19 at 12:18 +0200, Mark wrote: > John-Mark Bell wrote: > > All of these callbacks should take a void * for the client context. > > > then I'll give them a void * :-)
search_step and search_create_context will need to be modified to take the client context pointer to pass back to the callbacks, too. > > +void search_step(struct browser_window *bw, search_flags_t flags, > > + const char * string, struct search_callbacks *callbacks); > > > > > > Why does this need a pointer to the callbacks? Surely it's stored in the > > relevant search context? > > > for a very similar reason to the reason that we send a browser_window > rather than a search_context; the search_context could be NULL [the > sign that the search is a new search], so the function needs the > necessary references in case we're creating a new search_context Right. Can you remind me why it's this way, rather than the frontend creating/destroying the search context as appropriate? J.
