[Xapian-tickets] [Xapian] #199: Tidy up matchspy.h for inclusion in a release
Xapian
nobody at xapian.org
Sat Aug 1 16:47:11 BST 2009
#199: Tidy up matchspy.h for inclusion in a release
-------------------------+--------------------------------------------------
Reporter: richard | Owner: richard
Type: defect | Status: assigned
Priority: high | Milestone: 1.1.4
Component: Library API | Version: SVN trunk
Severity: normal | Resolution:
Keywords: | Blockedby: 198
Platform: All | Blocking:
-------------------------+--------------------------------------------------
Comment(by olly):
A few comments:
* As I mentioned on IRC, !MultiMatchSpy can probably just have a
reference to the vector of !MatchSpy objects in Xapian::Enquire rather
than making a copy.
* If that works, then we can just make the !MultiMatchSpy object an auto
variable (since it's just a wrapper around a reference member variable)
which avoids having to allocate it on the heap and use !AutoPtr to manage
its cleanup.
* The "new" matchspy is applied after matchdecider, but the old one was
applied before. Without thinking about it much, I think this is probably
saner, but I thought I should point it out in case it's a mistake.
* This adds some "naked" structs to the API, which isn't something we
currently have, and tends to tie down the implementation rather a lot, so
I think we need to carefully consider doing this. Classes with private
members readable via getters inlined from the API headers would generate
equally good code, not restrict future changes as much, and may be easier
to wrap nicely with SWIG.
I noticed a few typos and minor tweaks I don't think are at all
controversial, so I've just committed changes for those as that's less
work that trying to describe them...
Not completely finished looking through, but it's nearing bedtime so I'll
take a further look later.
--
Ticket URL: <http://trac.xapian.org/ticket/199#comment:15>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list