-
Notifications
You must be signed in to change notification settings - Fork 44
Conversation
Hi @beenje Welcome to PyTango! Thanks for the PR. It seems like a good idea. Looking at the related tickets, were you trying to compile PyTango on MacOS? That would be nice.
I've never noticed that before, but yes, it looks like the intention is to use |
ext/exception.cpp
Outdated
@@ -58,7 +58,7 @@ namespace Tango | |||
|
|||
void sequencePyDevError_2_DevErrorList(PyObject *value, Tango::DevErrorList &del) | |||
{ | |||
long len = max((int)PySequence_Size(value), 0); | |||
long len = std::max((int)PySequence_Size(value), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the AppVeyor build is failing here - the Visual Studio compiler doesn't like this. Any idea why? Can we leave this one out, or do we need an #ifdef
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an old answer but from https://stackoverflow.com/a/2789509, it looks like we need to use #define NOMINMAX
for windows.
I'll give it a try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a new commit that should fix the build on windows.
Prevent macro invocation (max macro defined in windows.h). See https://stackoverflow.com/a/2789509
I tried to replace the
I kept
Any idea? |
No, I'm not sure why. It looks like the boost library is still using I'm happy if we just leave the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -58,7 +58,7 @@ namespace Tango | |||
|
|||
void sequencePyDevError_2_DevErrorList(PyObject *value, Tango::DevErrorList &del) | |||
{ | |||
long len = std::max((int)PySequence_Size(value), 0); | |||
long len = (std::max)((int)PySequence_Size(value), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. I prefer this approach to messing with the include files.
@beenje Is there anything else you still want to add to this PR, or can I merge it? |
If we don't touch the |
Allow to compile with
TANGO_USE_USING_NAMESPACE=OFF
incppTango
.Add
std::
prefix to:Should
std::auto_ptr
be replaced withunique_pointer
instead?