Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
978d439e
Commit
978d439e
authored
Nov 03, 2018
by
Michał Wawrzyniec Urbańczyk
Committed by
Wenzel Jakob
Nov 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add PYBIND11_ prefix to the THROW macro to prevent name collisions. (#1578)
parent
741576dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
include/pybind11/pybind11.h
+6
-6
No files found.
include/pybind11/pybind11.h
View file @
978d439e
...
@@ -1464,12 +1464,12 @@ struct enum_base {
...
@@ -1464,12 +1464,12 @@ struct enum_base {
PYBIND11_ENUM_OP_STRICT
(
"__ne__"
,
!
int_
(
a
).
equal
(
int_
(
b
)),
return
true
);
PYBIND11_ENUM_OP_STRICT
(
"__ne__"
,
!
int_
(
a
).
equal
(
int_
(
b
)),
return
true
);
if
(
is_arithmetic
)
{
if
(
is_arithmetic
)
{
#define THROW throw type_error("Expected an enumeration of matching type!");
#define
PYBIND11_
THROW throw type_error("Expected an enumeration of matching type!");
PYBIND11_ENUM_OP_STRICT
(
"__lt__"
,
int_
(
a
)
<
int_
(
b
),
THROW
);
PYBIND11_ENUM_OP_STRICT
(
"__lt__"
,
int_
(
a
)
<
int_
(
b
),
PYBIND11_
THROW
);
PYBIND11_ENUM_OP_STRICT
(
"__gt__"
,
int_
(
a
)
>
int_
(
b
),
THROW
);
PYBIND11_ENUM_OP_STRICT
(
"__gt__"
,
int_
(
a
)
>
int_
(
b
),
PYBIND11_
THROW
);
PYBIND11_ENUM_OP_STRICT
(
"__le__"
,
int_
(
a
)
<=
int_
(
b
),
THROW
);
PYBIND11_ENUM_OP_STRICT
(
"__le__"
,
int_
(
a
)
<=
int_
(
b
),
PYBIND11_
THROW
);
PYBIND11_ENUM_OP_STRICT
(
"__ge__"
,
int_
(
a
)
>=
int_
(
b
),
THROW
);
PYBIND11_ENUM_OP_STRICT
(
"__ge__"
,
int_
(
a
)
>=
int_
(
b
),
PYBIND11_
THROW
);
#undef THROW
#undef
PYBIND11_
THROW
}
}
}
}
...
...
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