Skip to content

Commit 352792c

Browse files
committed
Add more export symbols.
1 parent 47faef6 commit 352792c

File tree

7 files changed

+56
-40
lines changed

7 files changed

+56
-40
lines changed

include/boost/python/numpy/dtype.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class BOOST_NUMPY_DECL dtype : public object {
7070

7171
};
7272

73-
bool equivalent(dtype const & a, dtype const & b);
73+
BOOST_NUMPY_DECL bool equivalent(dtype const & a, dtype const & b);
7474

7575
namespace detail
7676
{

include/boost/python/numpy/invoke_matching.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace boost { namespace python { namespace numpy {
1919
namespace detail
2020
{
2121

22-
struct add_pointer_meta
22+
struct BOOST_NUMPY_DECL add_pointer_meta
2323
{
2424
template <typename T>
2525
struct apply
@@ -29,8 +29,8 @@ struct add_pointer_meta
2929

3030
};
3131

32-
struct dtype_template_match_found {};
33-
struct nd_template_match_found {};
32+
struct BOOST_NUMPY_DECL dtype_template_match_found {};
33+
struct BOOST_NUMPY_DECL nd_template_match_found {};
3434

3535
template <typename Function>
3636
struct dtype_template_invoker

include/boost/python/numpy/matrix.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class BOOST_NUMPY_DECL matrix : public ndarray
6161
* return a numpy.matrix instead.
6262
*/
6363
template <typename Base = default_call_policies>
64-
struct BOOST_NUMPY_DECL as_matrix : Base
64+
struct as_matrix : Base
6565
{
6666
static PyObject * postcall(PyObject *, PyObject * result)
6767
{

include/boost/python/numpy/ndarray.hpp

Lines changed: 44 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -142,32 +142,32 @@ class BOOST_NUMPY_DECL ndarray : public object
142142
/**
143143
* @brief Construct a new array with the given shape and data type, with data initialized to zero.
144144
*/
145-
ndarray zeros(python::tuple const & shape, dtype const & dt);
146-
ndarray zeros(int nd, Py_intptr_t const * shape, dtype const & dt);
145+
BOOST_NUMPY_DECL ndarray zeros(python::tuple const & shape, dtype const & dt);
146+
BOOST_NUMPY_DECL ndarray zeros(int nd, Py_intptr_t const * shape, dtype const & dt);
147147

148148
/**
149149
* @brief Construct a new array with the given shape and data type, with data left uninitialized.
150150
*/
151-
ndarray empty(python::tuple const & shape, dtype const & dt);
152-
ndarray empty(int nd, Py_intptr_t const * shape, dtype const & dt);
151+
BOOST_NUMPY_DECL ndarray empty(python::tuple const & shape, dtype const & dt);
152+
BOOST_NUMPY_DECL ndarray empty(int nd, Py_intptr_t const * shape, dtype const & dt);
153153

154154
/**
155155
* @brief Construct a new array from an arbitrary Python sequence.
156156
*
157157
* @todo This does't seem to handle ndarray subtypes the same way that "numpy.array" does in Python.
158158
*/
159-
ndarray array(object const & obj);
160-
ndarray array(object const & obj, dtype const & dt);
159+
BOOST_NUMPY_DECL ndarray array(object const & obj);
160+
BOOST_NUMPY_DECL ndarray array(object const & obj, dtype const & dt);
161161

162162
namespace detail
163163
{
164164

165-
ndarray from_data_impl(void * data,
166-
dtype const & dt,
167-
std::vector<Py_intptr_t> const & shape,
168-
std::vector<Py_intptr_t> const & strides,
169-
object const & owner,
170-
bool writeable);
165+
BOOST_NUMPY_DECL ndarray from_data_impl(void * data,
166+
dtype const & dt,
167+
std::vector<Py_intptr_t> const & shape,
168+
std::vector<Py_intptr_t> const & strides,
169+
object const & owner,
170+
bool writeable);
171171

172172
template <typename Container>
173173
ndarray from_data_impl(void * data,
@@ -183,12 +183,12 @@ ndarray from_data_impl(void * data,
183183
return from_data_impl(data, dt, shape_, strides_, owner, writeable);
184184
}
185185

186-
ndarray from_data_impl(void * data,
187-
dtype const & dt,
188-
object const & shape,
189-
object const & strides,
190-
object const & owner,
191-
bool writeable);
186+
BOOST_NUMPY_DECL ndarray from_data_impl(void * data,
187+
dtype const & dt,
188+
object const & shape,
189+
object const & strides,
190+
object const & owner,
191+
bool writeable);
192192

193193
} // namespace boost::python::numpy::detail
194194

@@ -250,39 +250,53 @@ inline ndarray from_data(void const * data,
250250
* @param[in] nd_max Maximum number of dimensions.
251251
* @param[in] flags Bitwise OR of flags specifying additional requirements.
252252
*/
253-
ndarray from_object(object const & obj, dtype const & dt,
254-
int nd_min, int nd_max, ndarray::bitflag flags=ndarray::NONE);
255-
256-
inline ndarray from_object(object const & obj, dtype const & dt,
257-
int nd, ndarray::bitflag flags=ndarray::NONE)
253+
BOOST_NUMPY_DECL ndarray from_object(object const & obj,
254+
dtype const & dt,
255+
int nd_min,
256+
int nd_max,
257+
ndarray::bitflag flags=ndarray::NONE);
258+
259+
BOOST_NUMPY_DECL inline ndarray from_object(object const & obj,
260+
dtype const & dt,
261+
int nd,
262+
ndarray::bitflag flags=ndarray::NONE)
258263
{
259264
return from_object(obj, dt, nd, nd, flags);
260265
}
261266

262-
inline ndarray from_object(object const & obj, dtype const & dt, ndarray::bitflag flags=ndarray::NONE)
267+
BOOST_NUMPY_DECL inline ndarray from_object(object const & obj,
268+
dtype const & dt,
269+
ndarray::bitflag flags=ndarray::NONE)
263270
{
264271
return from_object(obj, dt, 0, 0, flags);
265272
}
266273

267-
ndarray from_object(object const & obj, int nd_min, int nd_max,
268-
ndarray::bitflag flags=ndarray::NONE);
274+
BOOST_NUMPY_DECL ndarray from_object(object const & obj,
275+
int nd_min,
276+
int nd_max,
277+
ndarray::bitflag flags=ndarray::NONE);
269278

270-
inline ndarray from_object(object const & obj, int nd, ndarray::bitflag flags=ndarray::NONE)
279+
BOOST_NUMPY_DECL inline ndarray from_object(object const & obj,
280+
int nd,
281+
ndarray::bitflag flags=ndarray::NONE)
271282
{
272283
return from_object(obj, nd, nd, flags);
273284
}
274285

275-
inline ndarray from_object(object const & obj, ndarray::bitflag flags=ndarray::NONE)
286+
BOOST_NUMPY_DECL inline ndarray from_object(object const & obj,
287+
ndarray::bitflag flags=ndarray::NONE)
276288
{
277289
return from_object(obj, 0, 0, flags);
278290
}
279291

280-
inline ndarray::bitflag operator|(ndarray::bitflag a, ndarray::bitflag b)
292+
BOOST_NUMPY_DECL inline ndarray::bitflag operator|(ndarray::bitflag a,
293+
ndarray::bitflag b)
281294
{
282295
return ndarray::bitflag(int(a) | int(b));
283296
}
284297

285-
inline ndarray::bitflag operator&(ndarray::bitflag a, ndarray::bitflag b)
298+
BOOST_NUMPY_DECL inline ndarray::bitflag operator&(ndarray::bitflag a,
299+
ndarray::bitflag b)
286300
{
287301
return ndarray::bitflag(int(a) & int(b));
288302
}

include/boost/python/numpy/numpy_object_mgr_traits.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
#ifndef boost_python_numpy_numpy_object_mgr_traits_hpp_
88
#define boost_python_numpy_numpy_object_mgr_traits_hpp_
99

10+
#include <boost/python/numpy/config.hpp>
11+
1012
/**
1113
* @brief Macro that specializes object_manager_traits by requiring a
1214
* source-file implementation of get_pytype().
1315
*/
1416

1517
#define NUMPY_OBJECT_MANAGER_TRAITS(manager) \
1618
template <> \
17-
struct object_manager_traits<manager> \
19+
struct BOOST_NUMPY_DECL object_manager_traits<manager> \
1820
{ \
1921
BOOST_STATIC_CONSTANT(bool, is_specialized = true); \
2022
static inline python::detail::new_reference adopt(PyObject* x) \

include/boost/python/numpy/scalars.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace boost { namespace python { namespace numpy {
2222
*
2323
* @todo This could have a lot more functionality.
2424
*/
25-
class void_ : public object
25+
class BOOST_NUMPY_DECL void_ : public object
2626
{
2727
static python::detail::new_reference convert(object_cref arg, bool align);
2828
public:

include/boost/python/numpy/ufunc.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ class BOOST_NUMPY_DECL multi_iter : public object
6262
};
6363

6464
/// @brief Construct a multi_iter over a single sequence or scalar object.
65-
multi_iter make_multi_iter(object const & a1);
65+
BOOST_NUMPY_DECL multi_iter make_multi_iter(object const & a1);
6666

6767
/// @brief Construct a multi_iter by broadcasting two objects.
68-
multi_iter make_multi_iter(object const & a1, object const & a2);
68+
BOOST_NUMPY_DECL multi_iter make_multi_iter(object const & a1, object const & a2);
6969

7070
/// @brief Construct a multi_iter by broadcasting three objects.
71-
multi_iter make_multi_iter(object const & a1, object const & a2, object const & a3);
71+
BOOST_NUMPY_DECL multi_iter make_multi_iter(object const & a1, object const & a2, object const & a3);
7272

7373
/**
7474
* @brief Helps wrap a C++ functor taking a single scalar argument as a broadcasting ufunc-like

0 commit comments

Comments
 (0)