[Xapian-tickets] [Xapian] #193: Check that NumberValueRangeProcessor::apply() is usable from bindings (was: NumberValueRangeProcessor_apply not working in the PHP-bindings)

Xapian nobody at xapian.org
Thu Feb 16 02:59:22 GMT 2012


#193: Check that NumberValueRangeProcessor::apply() is usable from bindings
-----------------------------+----------------------------------------------
 Reporter:  daniel           |        Owner:  olly    
     Type:  defect           |       Status:  assigned
 Priority:  normal           |    Milestone:  1.2.x   
Component:  Xapian-bindings  |      Version:  1.0.2   
 Severity:  normal           |   Resolution:          
 Keywords:                   |    Blockedby:          
 Platform:  All              |     Blocking:          
-----------------------------+----------------------------------------------
Changes (by olly):

  * component:  Xapian-bindings (PHP) => Xapian-bindings


Old description:

> The following returns an error, even though the right arguments have been
> passed:
>
> {{{
> #!php
> $vrp = new XapianNumberValueRangeProcessor(0, "\$", true);
> $vrp->apply((string)"240", (string)"500");
> }}}
>
> The error returned is:
> {{{
> Fatal error: Type error in argument 2 of NumberValueRangeProcessor_apply.
> Expected
> SWIGTYPE_p_std__string in xapian.php on line 1217
> }}}
>
> line 1217 being:
> {{{
> #!php
> return NumberValueRangeProcessor_apply($this->_cPtr,$begin,$end);
> }}}
> Have tried changing that line to say {{{(string)$begin}}} and
> {{{(string)$end}}}, same result.

New description:

 This has been addressed for PHP and Python now - other languages need a
 testcase adding and any problems it uncovers fixing.

 ----

 ''Original report:''

 The following returns an error, even though the right arguments have been
 passed:

 {{{
 #!php
 $vrp = new XapianNumberValueRangeProcessor(0, "\$", true);
 $vrp->apply((string)"240", (string)"500");
 }}}

 The error returned is:
 {{{
 Fatal error: Type error in argument 2 of NumberValueRangeProcessor_apply.
 Expected
 SWIGTYPE_p_std__string in xapian.php on line 1217
 }}}

 line 1217 being:
 {{{
 #!php
 return NumberValueRangeProcessor_apply($this->_cPtr,$begin,$end);
 }}}
 Have tried changing that line to say {{{(string)$begin}}} and
 {{{(string)$end}}}, same result.

--

-- 
Ticket URL: <http://trac.xapian.org/ticket/193#comment:21>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list