Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 2).

(See commit e1771e72fbbf828dbf5bed871b814288389f3611 for more detail of
the problem).

Fixed for #include <Python.h> not properly put in the extern "C" { ... } construct.

Also removed redundant inclusion of the header file in the Freestyle Python API code.
This commit is contained in:
2014-04-17 12:25:41 +09:00
parent 5db8da8105
commit 5d4a6a94ef
157 changed files with 83 additions and 286 deletions

View File

@@ -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 <Python.h>
extern PyTypeObject FEdge_Type;
#define BPy_FEdge_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&FEdge_Type))

View File

@@ -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 <Python.h>
extern PyTypeObject FrsCurve_Type;
#define BPy_FrsCurve_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&FrsCurve_Type))

View File

@@ -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 <Python.h>
extern PyTypeObject Stroke_Type;
#define BPy_Stroke_Check(v) (((PyObject *)v)->ob_type == &Stroke_Type)

View File

@@ -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 <Python.h>
extern PyTypeObject ViewEdge_Type;
#define BPy_ViewEdge_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&ViewEdge_Type))

View File

@@ -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 <Python.h>
extern PyTypeObject Chain_Type;
#define BPy_Chain_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&Chain_Type))

View File

@@ -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 <Python.h>
extern PyTypeObject FEdgeSharp_Type;
#define BPy_FEdgeSharp_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&FEdgeSharp_Type))

View File

@@ -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 <Python.h>
extern PyTypeObject FEdgeSmooth_Type;
#define BPy_FEdgeSmooth_Check(v) (PyObject_IsInstance((PyObject *)v, (PyObject *)&FEdgeSmooth_Type))