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/Interface1D/BPy_FEdge.h | 3 +-- source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h | 3 +-- source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h | 3 +-- source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h | 6 ++---- .../blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h | 3 +-- .../freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h | 3 +-- .../freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h | 3 +-- 7 files changed, 8 insertions(+), 16 deletions(-) (limited to 'source/blender/freestyle/intern/python/Interface1D') diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h index 7e27e3e93ab..69e7fddd770 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_FEDGE_H__ #include "../BPy_Interface1D.h" + #include "../../view_map/Silhouette.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject FEdge_Type; #define BPy_FEdge_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&FEdge_Type)) diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h index e119fef5758..990d8fb5b24 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_FRSCURVE_H__ #include "../BPy_Interface1D.h" + #include "../../stroke/Curve.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject FrsCurve_Type; #define BPy_FrsCurve_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&FrsCurve_Type)) diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h index 0ceaf3ec9f5..a22e5c2d006 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_STROKE_H__ #include "../BPy_Interface1D.h" + #include "../../stroke/Stroke.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject Stroke_Type; #define BPy_Stroke_Check(v) (((PyObject *)v)->ob_type == &Stroke_Type) diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h index d47fed0fdc2..51af401f33b 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.h @@ -25,18 +25,16 @@ #ifndef __FREESTYLE_PYTHON_VIEWEDGE_H__ #define __FREESTYLE_PYTHON_VIEWEDGE_H__ -#include "../../view_map/ViewMap.h" - #include "../BPy_Interface1D.h" +#include "../../view_map/ViewMap.h" + #ifdef __cplusplus extern "C" { #endif /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject ViewEdge_Type; #define BPy_ViewEdge_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ViewEdge_Type)) diff --git a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h index 867b9b0387d..172dffff49b 100644 --- a/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h +++ b/source/blender/freestyle/intern/python/Interface1D/Curve/BPy_Chain.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_CHAIN_H__ #include "../BPy_FrsCurve.h" + #include "../../../stroke/Chain.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject Chain_Type; #define BPy_Chain_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&Chain_Type)) diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h index 37f678ddd93..1c82453432b 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_FEDGESHARP_H__ #include "../BPy_FEdge.h" + #include "../../../view_map/Silhouette.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject FEdgeSharp_Type; #define BPy_FEdgeSharp_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&FEdgeSharp_Type)) diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h index a88afc24557..f3dfd796418 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h @@ -26,6 +26,7 @@ #define __FREESTYLE_PYTHON_FEDGESMOOTH_H__ #include "../BPy_FEdge.h" + #include "../../../view_map/Silhouette.h" #ifdef __cplusplus @@ -34,8 +35,6 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// -#include - extern PyTypeObject FEdgeSmooth_Type; #define BPy_FEdgeSmooth_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&FEdgeSmooth_Type)) -- cgit v1.2.3