Skip to content

Commit 3844c4f

Browse files
committed
Fix more missing symbols.
1 parent df16e3e commit 3844c4f

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

include/boost/python/numpy/dtype.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct builtin_dtype<T,true> {
9090
};
9191

9292
template <>
93-
struct builtin_dtype<bool,true> {
93+
struct BOOST_NUMPY_DECL builtin_dtype<bool,true> {
9494
static dtype get();
9595
};
9696

src/numpy/dtype.cpp

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,33 @@
1111
#include <boost/python/numpy/internal.hpp>
1212

1313
#define DTYPE_FROM_CODE(code) \
14-
dtype(python::detail::new_reference(reinterpret_cast<PyObject*>(PyArray_DescrFromType(code))))
14+
dtype(python::detail::new_reference(reinterpret_cast<PyObject*>(PyArray_DescrFromType(code))))
1515

1616
#define BUILTIN_INT_DTYPE(bits) \
17-
template <> struct builtin_int_dtype< bits, false > { \
18-
static dtype get() { return DTYPE_FROM_CODE(NPY_INT ## bits); } \
19-
}; \
20-
template <> struct builtin_int_dtype< bits, true > { \
21-
static dtype get() { return DTYPE_FROM_CODE(NPY_UINT ## bits); } \
22-
}; \
23-
template dtype get_int_dtype< bits, false >(); \
24-
template dtype get_int_dtype< bits, true >()
17+
template <> struct builtin_int_dtype<bits, false> \
18+
{ \
19+
static dtype get() { return DTYPE_FROM_CODE(NPY_INT ## bits);} \
20+
}; \
21+
template <> struct builtin_int_dtype<bits, true> \
22+
{ \
23+
static dtype get() { return DTYPE_FROM_CODE(NPY_UINT ## bits);} \
24+
}; \
25+
template BOOST_NUMPY_DECL dtype get_int_dtype<bits, false>(); \
26+
template BOOST_NUMPY_DECL dtype get_int_dtype<bits, true>()
2527

2628
#define BUILTIN_FLOAT_DTYPE(bits) \
27-
template <> struct builtin_float_dtype< bits > { \
28-
static dtype get() { return DTYPE_FROM_CODE(NPY_FLOAT ## bits); } \
29-
}; \
30-
template dtype get_float_dtype< bits >()
29+
template <> struct builtin_float_dtype<bits> \
30+
{ \
31+
static dtype get() { return DTYPE_FROM_CODE(NPY_FLOAT ## bits);} \
32+
}; \
33+
template BOOST_NUMPY_DECL dtype get_float_dtype<bits>()
3134

3235
#define BUILTIN_COMPLEX_DTYPE(bits) \
33-
template <> struct builtin_complex_dtype< bits > { \
34-
static dtype get() { return DTYPE_FROM_CODE(NPY_COMPLEX ## bits); } \
35-
}; \
36-
template dtype get_complex_dtype< bits >()
36+
template <> struct builtin_complex_dtype<bits> \
37+
{ \
38+
static dtype get() { return DTYPE_FROM_CODE(NPY_COMPLEX ## bits);} \
39+
}; \
40+
template BOOST_NUMPY_DECL dtype get_complex_dtype<bits>()
3741

3842
namespace boost { namespace python { namespace converter {
3943
NUMPY_OBJECT_MANAGER_TRAITS_IMPL(PyArrayDescr_Type, numpy::dtype)

0 commit comments

Comments
 (0)