[Xapian-tickets] [Xapian] #703: Python 3 sortable_serialise() broken on 32 bit
Xapian
nobody at xapian.org
Sun Jan 10 22:03:25 GMT 2016
#703: Python 3 sortable_serialise() broken on 32 bit
--------------------------------------+----------------------------
Reporter: barry | Owner: richard
Type: defect | Status: new
Priority: normal | Milestone: 1.3.x
Component: Xapian-bindings (Python) | Version: 1.3.3
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
--------------------------------------+----------------------------
Comment (by olly):
The SWIG fix I had in mind is in the recently released SWIG 3.0.8:
{{{
2015-12-23: ahnolds
[Python] Fixes for conversion of signed and unsigned integer
types:
No longer check for PyInt objects in Python3. Because
PyInt_Check
and friends are #defined to the corresponding PyLong methods,
this
had caused errors in Python3 where values greater than what
could be
stored in a long were incorrectly interpreted as the value -1
with
the Python error indicator set to OverflowError. This applies
to
both the conversions PyLong->long and PyLong->double.
Conversion from PyLong to long, unsigned long, long long, and
unsigned long long now raise OverflowError instead of
TypeError in
both Python2 and Python3 for PyLong values outside the range
expressible by the corresponding C type. This matches the
existing
behavior for other integral types (signed and unsigned ints,
shorts,
and chars), as well as the conversion for PyInt to all
numeric
types. This also indirectly applies to the size_t and
ptrdiff_t
types, which depend on the conversions for unsigned long and
long.
}}}
--
Ticket URL: <http://trac.xapian.org/ticket/703#comment:5>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list