File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 99
1010namespace boost { namespace python { namespace converter {
1111
12- BOOST_PYTHON_DECL PyObject* checked_downcast_impl (PyObject*, PyTypeObject*);
13-
12+ BOOST_PYTHON_DECL inline
13+ PyObject* checked_downcast_impl (PyObject *obj, PyTypeObject *type)
14+ {
15+ return (PyType_IsSubtype (Py_TYPE (obj), type) ? obj : NULL );
16+ }
1417// Used as a base class for specializations which need to provide
1518// Python type checking capability.
1619template <class Object , PyTypeObject* pytype>
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class BOOST_NUMPY_DECL dtype : public object {
5656 * This is more permissive than equality tests. For instance, if long and int are the same
5757 * size, the dtypes corresponding to each will be equivalent, but not equal.
5858 */
59- friend bool equivalent (dtype const & a, dtype const & b);
59+ friend BOOST_NUMPY_DECL bool equivalent (dtype const & a, dtype const & b);
6060
6161 /* *
6262 * @brief Register from-Python converters for NumPy's built-in array scalar types.
You can’t perform that action at this time.
0 commit comments