Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
95e9b123
Commit
95e9b123
authored
Jun 26, 2016
by
Ivan Smirnov
Browse files
Prefix the FIELD_DESCRIPTOR macro
parent
5e71e17b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
include/pybind11/numpy.h
include/pybind11/numpy.h
+2
-2
No files found.
include/pybind11/numpy.h
View file @
95e9b123
...
@@ -267,7 +267,7 @@ private:
...
@@ -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:
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment