mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-30 00:47:12 +00:00
Prefix the FIELD_DESCRIPTOR macro
This commit is contained in:
parent
5e71e17bdf
commit
95e9b12322
@ -267,7 +267,7 @@ private:
|
|||||||
static inline char* format_() { static char s[4096]; return s; }
|
static inline char* format_() { static char s[4096]; return s; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FIELD_DESCRIPTOR(Type, Field) \
|
#define PB11_IMPL_FIELD_DESCRIPTOR(Type, Field) \
|
||||||
::pybind11::detail::field_descriptor { \
|
::pybind11::detail::field_descriptor { \
|
||||||
#Field, offsetof(Type, Field), \
|
#Field, offsetof(Type, Field), \
|
||||||
::pybind11::detail::npy_format_descriptor<decltype(static_cast<Type*>(0)->Field)>::descr() \
|
::pybind11::detail::npy_format_descriptor<decltype(static_cast<Type*>(0)->Field)>::descr() \
|
||||||
@ -298,7 +298,7 @@ private:
|
|||||||
|
|
||||||
#define PYBIND11_DTYPE(Type, ...) \
|
#define PYBIND11_DTYPE(Type, ...) \
|
||||||
::pybind11::detail::npy_format_descriptor<Type>::register_dtype \
|
::pybind11::detail::npy_format_descriptor<Type>::register_dtype \
|
||||||
({PB11_IMPL_MAP_LIST(FIELD_DESCRIPTOR, Type, __VA_ARGS__)})
|
({PB11_IMPL_MAP_LIST(PB11_IMPL_FIELD_DESCRIPTOR, Type, __VA_ARGS__)})
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
using array_iterator = typename std::add_pointer<T>::type;
|
using array_iterator = typename std::add_pointer<T>::type;
|
||||||
|
Loading…
Reference in New Issue
Block a user