2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 18:52:26 +00:00

boost/python: some Py_ssize_t replaced with boost::python::ssize_t to restore compatibility with Python 2.3 and 2.4

[SVN r56491]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2009-09-30 12:35:54 +00:00
parent 115cde9c7f
commit 35ff0adf2b
3 changed files with 4 additions and 4 deletions

View File

@@ -144,11 +144,11 @@ void list_base::sort(object_cref cmpfunc)
// For some reason, moving this to the end of the TU suppresses an ICE
// with vc6.
Py_ssize_t list_base::count(object_cref value) const
ssize_t list_base::count(object_cref value) const
{
object result_obj(this->attr("count")(value));
#if PY_VERSION_HEX >= 0x03000000
Py_ssize_t result = PyLong_AsSsize_t(result_obj.ptr());
ssize_t result = PyLong_AsSsize_t(result_obj.ptr());
#else
long result = PyInt_AsLong(result_obj.ptr());
#endif