diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-04-17 07:01:10 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-04-17 09:37:05 +0400 |
commit | 5db8da81055be7fb89b4d824ce17e61ffeb46060 (patch) | |
tree | 3db5abe219ebf5a1857033043390537050ee6d9b /source/blender/freestyle/intern/python | |
parent | ba61992cc3a98bdcc9cebd59ea96cfad5a63e08d (diff) |
Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 1).
The issue was caused by including both Python.h and BLI_math.h. Since the macro
definition in Python.h was unconditional, it was necessary to include it first and then
BLI_math.h.
Addressing the issue turned out to affect many Freestyle source files. There were several
other coding flaws that complicated the situation:
1. intern/system/FreestyleConfig.h was abused just to include BLI_math.h which was in
fact unnecessary in FreestyleConfig.h. While addressing this, inclusion of both math.h
and BLI_math.h had to be duly dealt with to avoid a compiler error about round().
2. #include <Python.h> was not properly put in the extern "C" { ... } construct.
3. intern/view_map/Interface0D.h and intern/python/Director.h, both of which included
Python.h, were included from within Freestyle header files that were almost or completely
independent of Python. These non-Python header files were used everywhere in the
Freestyle code base, causing many cases of the reported macro redefinitions.
4. The Director.h file was also declaring 'using namespace Freestyle', which was causing
another scope issue in several Freestyle header files.
This commit is intended to address the first problem above. Subsequent commits will deal
with the other three.
Diffstat (limited to 'source/blender/freestyle/intern/python')
0 files changed, 0 insertions, 0 deletions