Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#192 closed defect (released)

Enquire_set_cutoff() does not work as documented in the php-bindings

Reported by: alec Owned by: Olly Betts
Priority: normal Milestone:
Component: Xapian-bindings Version: 1.0.2
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

Enquire_set_cutoff (on line 679 of xapian.php) takes three arguments, the resource pointer, percent_cutoff and weight_cutoff.

Executing this function with all 3 arguments (as the bindings always do without manual modification) results in this php error:

Fatal error: No matching function for overloaded 'Enquire_set_cutoff' in ...xapian.php on line 679

But if I remove the weight_cutoff argument in xapian.php: Enquire_set_cutoff($this->_cPtr,$percent_cutoff);

Then it will run with no errors.

I'm thinking this may be a bug introduced by SWIG.

Change History (4)

comment:1 by Olly Betts, 17 years ago

op_sys: LinuxAll
Owner: changed from Richard Boulton to Olly Betts
rep_platform: PCAll

The problem is that the default value for the last parameter should be 0.0, not 0.

You can work around this by explicitly specifying this parameter with value 0.0.

comment:2 by Olly Betts, 17 years ago

Status: newassigned

comment:3 by Olly Betts, 17 years ago

Resolution: fixed
Status: assignedclosed

Fixed in SWIG SVN, and bumped the revision of the SWIG SVN snapshot we use to generate the bindings.

comment:4 by Olly Betts, 17 years ago

Operating System: All
Resolution: fixedreleased

Fixed in 1.0.3

Note: See TracTickets for help on using tickets.