Ticket #192 (closed defect: released)

Opened 17 months ago

Last modified 16 months ago

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

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

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

Changed 17 months ago by olly

  • owner changed from richard to olly
  • rep_platform changed from PC to All
  • op_sys changed from Linux to All

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.

Changed 17 months ago by olly

  • status changed from new to assigned

Changed 17 months ago by olly

  • status changed from assigned to closed
  • resolution set to fixed

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

Changed 16 months ago by olly

  • resolution changed from fixed to released

Fixed in 1.0.3

Changed 16 months ago by trac

  • platform set to All
Note: See TracTickets for help on using tickets.