[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.
Brecht Van Lommel added the comment: With the language summit passed some time ago, is there now a more clear picture of how this would fit in the initialisation process? Any idea of what a proper implementation would look like, or is the message still to wait? -- nosy: +Brecht.Van.Lommel ___ Python tracker <http://bugs.python.org/issue16129> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.
Brecht Van Lommel added the comment: I tested the patch on Windows and can confirm it solves the problem for Blender. -- ___ Python tracker <http://bugs.python.org/issue16129> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20221] #define hypot _hypot conflicts with existing definition
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 hypot(_In_ double _X, _In_ double _Y) { return _hypot(_X, _Y); } With the #define hypot _hypot that becomes: __inline double __CRTDECL _hypot(_In_ double _X, _In_ double _Y) { return _hypot(_X, _Y); } So you get infinite recursive calls when using hypot and the application crashes. The patch fix20221.patch that was attach here solves the issue. -- nosy: +Brecht.Van.Lommel ___ Python tracker <http://bugs.python.org/issue20221> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20221] #define hypot _hypot conflicts with existing definition
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 files (x86)\microsoft visual studio 12.0\vc\include\math.h(566) : warning C4717: '_hypot' : recursive on all control paths, function will cause runtime stack overflow I don't know about the conditions to get a warning in VS 2010, never tried that version. -- ___ Python tracker <http://bugs.python.org/issue20221> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com