[issue20221] #define hypot _hypot conflicts with existing definition

2014-10-17 Thread Zachary Ware
Zachary Ware added the comment: It grafted very easily, so it turns out to be "yes" :) -- versions: +Python 2.7 ___ Python tracker ___ ___

[issue20221] #define hypot _hypot conflicts with existing definition

2014-10-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 430aaeaa8087 by Zachary Ware in branch '2.7': Issue #20221: Removed conflicting (or circular) hypot definition https://hg.python.org/cpython/rev/430aaeaa8087 -- ___ Python tracker

[issue20221] #define hypot _hypot conflicts with existing definition

2014-10-02 Thread Shy Shalom
Shy Shalom added the comment: Any chance this would be merged to 2.7 as well? The comment from 2014-01-11 06:33:18 says "2.7" but PC/pyconfig.h still has #define hypot _hypot -- nosy: +Shy.Shalom ___ Python tracker

[issue20221] #define hypot _hypot conflicts with existing definition

2014-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 033d686af4c1 by Zachary Ware in branch '3.4': Issue #20221: Removed conflicting (or circular) hypot definition http://hg.python.org/cpython/rev/033d686af4c1 -- ___ Python tracker

[issue20221] #define hypot _hypot conflicts with existing definition

2014-02-20 Thread Zachary Ware
Zachary Ware added the comment: Fixed, thanks for the report and patch! -- assignee: -> zach.ware resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker _

[issue20221] #define hypot _hypot conflicts with existing definition

2014-02-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9aedb876c2d7 by Zachary Ware in branch '3.3': Issue #20221: Removed conflicting (or circular) hypot definition http://hg.python.org/cpython/rev/9aedb876c2d7 New changeset bf413a97f1a9 by Zachary Ware in branch 'default': Issue #20221: Removed confli

[issue20221] #define hypot _hypot conflicts with existing definition

2014-02-20 Thread Zachary Ware
Zachary Ware added the comment: Ok, I had missed that the warnings in your two separate cases were in fact different. I still don't understand why VC++ sees the two cases so differently (throwing different warnings), but it at least explains the different results in your two cases. I don't s

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-28 Thread Zachary Ware
Zachary Ware added the comment: Your test program works for VS2010 as well (/W4 is unnecessary, the default warning level gives the warning), but still doesn't answer the question of why the math module (specifically math.hypot) doesn't show the problem. I understand why both of your cases *do

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-28 Thread Zachary Ware
Changes by Zachary Ware : -- stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-28 Thread Brecht Van Lommel
Brecht Van Lommel added the comment: For Visual Studio 2013, here's how to redo the problem. Take this simple program: #include int main(int argc, char **argv) { return (int)hypot(rand(), rand()); } And compile it: cl.exe test.c -I include/python3.3 lib/python33.lib /W4 c:\program file

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-28 Thread Zachary Ware
Zachary Ware added the comment: Sorry, I wasn't entirely clear. By "compile fine", I meant "compiles without warnings, and actually works when you try to use it". Both math and cmath make use of hypot (as defined in pyconfig.h), but don't have any problems. They also have no problems with yo

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-28 Thread Tabrez Mohammed
Tabrez Mohammed added the comment: My extension doesn't compile because I treat warnings as errors. I believe Blender compiles fine, but crashes at runtime because of the infinite recursion (see the second code snippet in Brecht's response (http://bugs.python.org/msg208981). -- _

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-28 Thread Zachary Ware
Zachary Ware added the comment: I'm having difficulty wrapping my head around why the math and cmath modules (both of which use hypot) compile fine, but your extensions don't. Anyone have any insight into why that is? -- ___ Python tracker

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-23 Thread Brecht Van Lommel
Brecht Van Lommel added the comment: We have a similar issue in Blender (where Python is embedded), but it's actually causing a crash instead of only a compiler warning: https://developer.blender.org/T38256 The code in the Visual Studio 2013 math.h looks like this: __inline double __CRTDECL h

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-13 Thread Tabrez Mohammed
Changes by Tabrez Mohammed : -- keywords: +patch Added file: http://bugs.python.org/file33447/fix20221.patch ___ Python tracker ___ __

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-11 Thread Tabrez Mohammed
Tabrez Mohammed added the comment: Sorry, I realize I didn't mention this in the original post. I'm getting this compiler warning when building my Python extension, not when building Python itself. -- ___ Python tracker

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-10 Thread Tabrez Mohammed
Tabrez Mohammed added the comment: v100 toolset, with compiler setting /W4. Microsoft recommends W4 for all new C++ projects (see http://msdn.microsoft.com/en-us/library/thxezb7y(v=vs.100).aspx). I'm using 3.3. -- ___ Python tracker

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-10 Thread Zachary Ware
Zachary Ware added the comment: How are you compiling to get that warning? I've never seen it, and none of the Windows buildbots do either. Also, which version of Python are you compiling on which version of Windows? -- nosy: +zach.ware stage: -> test needed versions: -Python 2.7,

[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-10 Thread Tabrez Mohammed
New submission from Tabrez Mohammed: In pyconfig.h (line 216), there is this line: #define hypot _hypot This conflicts with the definition of _hypot that ships with VS2010 (math.h, line 161): static __inline double __CRTDECL hypot(_In_ double _X, _In_ double _Y) The result of the redefinition