mirror of
https://github.com/boostorg/python.git
synced 2026-01-26 06:42:27 +00:00
fix map_indexing_suite test case
[SVN r54868]
This commit is contained in:
@@ -48,7 +48,11 @@ struct AFromPython
|
||||
|
||||
static void* convertible(PyObject* obj_ptr)
|
||||
{
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
if (!PyLong_Check(obj_ptr)) return 0;
|
||||
#else
|
||||
if (!PyInt_Check(obj_ptr)) return 0;
|
||||
#endif
|
||||
return obj_ptr;
|
||||
}
|
||||
|
||||
@@ -60,7 +64,11 @@ struct AFromPython
|
||||
(boost::python::converter::rvalue_from_python_storage< A >*)
|
||||
data)-> storage.bytes;
|
||||
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
new (storage) A((int)PyLong_AsLong(obj_ptr));
|
||||
#else
|
||||
new (storage) A((int)PyInt_AsLong(obj_ptr));
|
||||
#endif
|
||||
data->convertible = storage;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -197,7 +197,7 @@ kiwi
|
||||
>>> tm["kimpo"] = X("bbb")
|
||||
>>> print_xmap(tm)
|
||||
[ (joel, aaa) (kimpo, bbb) ]
|
||||
>>> for el in tm:
|
||||
>>> for el in tm: #doctest: +NORMALIZE_WHITESPACE
|
||||
... print el.key(),
|
||||
... dom = el.data()
|
||||
joel kimpo
|
||||
|
||||
Reference in New Issue
Block a user