Skip to content

Commit edd890b

Browse files
committed
More dllexport fixes
1 parent 352792c commit edd890b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

include/boost/python/converter/pyobject_type.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99

1010
namespace 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.
1619
template <class Object, PyTypeObject* pytype>

include/boost/python/numpy/dtype.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)