[Xapian-tickets] [Xapian] #416: php bindings - get_values for ValueCountMatchSpy return resource
Xapian
nobody at xapian.org
Thu Dec 3 07:27:32 GMT 2009
#416: php bindings - get_values for ValueCountMatchSpy return resource
-----------------------------+----------------------------------------------
Reporter: overgroove | Owner: olly
Type: defect | Status: new
Priority: normal | Milestone: 1.1.4
Component: Xapian-bindings | Version: SVN trunk
Severity: normal | Keywords:
Blockedby: | Platform: All
Blocking: |
-----------------------------+----------------------------------------------
Comment(by olly):
{{{add_assoc_long()}}} is indeed just a macro which calls
{{{add_assoc_long_ex()}}}, but the length it uses is {{{strlen(p)}}} which
will truncate the term if it contains zero bytes. By calling
add_assoc_long_ex() explicitly, we can pass {{{term.length()}}} for the
length and preserve any zero bytes in term.
Even if we don't care about zero bytes in term, it's likely to be slightly
more efficient to use the already known length rather than recomputing it.
--
Ticket URL: <http://trac.xapian.org/ticket/416#comment:5>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list