From 5d4a6a94ef40f8ae8c49d8fd8fc65384324cb03c Mon Sep 17 00:00:00 2001 From: Tamito Kajiyama Date: Thu, 17 Apr 2014 12:25:41 +0900 Subject: Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 2). (See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of the problem). Fixed for #include not properly put in the extern "C" { ... } construct. Also removed redundant inclusion of the header file in the Freestyle Python API code. --- source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h | 3 +-- source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h | 4 +--- source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h | 5 ++--- .../intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h | 3 +-- .../freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h | 3 +-- .../freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h | 3 +-- 6 files changed, 7 insertions(+), 14 deletions(-) (limited to 'source/blender/freestyle/intern/python/Interface0D') diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h index 9ab5bea9e8c..5d651ef1a56 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_CURVEPOINT_H__ #include "../BPy_Interface0D.h" + #include "../../stroke/Curve.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject CurvePoint_Type; #define BPy_CurvePoint_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&CurvePoint_Type)) diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h index 84866fb5a4e..a154ac4e48e 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h @@ -25,9 +25,9 @@ #ifndef __FREESTYLE_PYTHON_SVERTEX_H__ #define __FREESTYLE_PYTHON_SVERTEX_H__ -#include "../../view_map/Silhouette.h" #include "../BPy_Interface0D.h" +#include "../../view_map/Silhouette.h" #ifdef __cplusplus extern "C" { @@ -35,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject SVertex_Type; #define BPy_SVertex_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&SVertex_Type)) diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h index 9589b939e57..21b45c987f2 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.h @@ -25,17 +25,16 @@ #ifndef __FREESTYLE_PYTHON_VIEWVERTEX_H__ #define __FREESTYLE_PYTHON_VIEWVERTEX_H__ -#include "../../view_map/ViewMap.h" #include "../BPy_Interface0D.h" +#include "../../view_map/ViewMap.h" + #ifdef __cplusplus extern "C" { #endif /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject ViewVertex_Type; #define BPy_ViewVertex_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ViewVertex_Type)) diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h index b4c52d6968e..8519fe98443 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_STROKEVERTEX_H__ #include "../BPy_CurvePoint.h" + #include "../../../stroke/Stroke.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject StrokeVertex_Type; #define BPy_StrokeVertex_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&StrokeVertex_Type)) diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h index 7d5ffd2d410..7f8d5c175c7 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_NONTVERTEX_H__ #include "../BPy_ViewVertex.h" + #include "../../../view_map/ViewMap.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject NonTVertex_Type; #define BPy_NonTVertex_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&NonTVertex_Type)) diff --git a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h index a3f8d0a57b0..4f14b5afdc0 100644 --- a/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h +++ b/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_TVERTEX_H__ #include "../BPy_ViewVertex.h" + #include "../../../view_map/ViewMap.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject TVertex_Type; #define BPy_TVertex_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&TVertex_Type)) -- cgit v1.2.3