Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[windows] reducing the odds to have name collisions #47

Merged
merged 3 commits into from
Feb 25, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions scripts/msg.h.template
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ for constant in spec.constants:

@# Integer constants
@[if len(constants_integer) > 0]@
// reducing the odds to have name collisions with Windows.h
@[for constant in constants_integer]@
#if defined(_WIN32) && defined(@(constant.name))
#undef @(constant.name)
#endif

@[end for]@
enum {
@[for constant in constants_integer]@
@[if (constant.type in ['byte', 'int8', 'int16', 'int32', 'int64', 'char'])]@
Expand Down