diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-03-14 16:27:41 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2009-03-14 16:27:41 +0300 |
commit | 6ba34d18b55bedbddb750e5231a2aec9a1fbbac0 (patch) | |
tree | 5a9fff1a268a7d0794721c6efb82a48f28ca3279 /source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double | |
parent | c49bdd1a14f9043d772ca69da13dc43720d3cedc (diff) |
Fixed incorrect argument checking.
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double')
14 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp index ae4a6c7f33d..02ff6bdcd80 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_Curvature2DAngleF1D.cpp @@ -104,12 +104,12 @@ int Curvature2DAngleF1D___init__( BPy_Curvature2DAngleF1D* self, PyObject *args) { PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O", &obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: Curvature2DAngleF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::Curvature2DAngleF1D(t); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp index b6b3262d1cc..ae3f09710bc 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_DensityF1D.cpp @@ -106,12 +106,12 @@ int DensityF1D___init__( BPy_DensityF1D* self, PyObject *args) double d = 2.0; float f = 2.0; - if( !PyArg_ParseTuple(args, "|dOf", &d, &obj, &f) ) { + if( !PyArg_ParseTuple(args, "|dO!f", &d, &IntegrationType_Type, &obj, &f) ) { cout << "ERROR: DensityF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::DensityF1D(d,t,f); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp index e9d47e1d945..2df6e8cc2fd 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetCompleteViewMapDensityF1D.cpp @@ -106,12 +106,12 @@ int GetCompleteViewMapDensityF1D___init__( BPy_GetCompleteViewMapDensityF1D* sel unsigned i; float f = 2.0; - if( !PyArg_ParseTuple(args, "i|Of", &i, &obj, &f) ) { + if( !PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) ) { cout << "ERROR: GetCompleteViewMapDensityF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetCompleteViewMapDensityF1D(i,t,f); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp index 7691cda9a30..6b0cd9d73a2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetDirectionalViewMapDensityF1D.cpp @@ -106,12 +106,12 @@ int GetDirectionalViewMapDensityF1D___init__( BPy_GetDirectionalViewMapDensityF1 unsigned int u1, u2; float f = 2.0; - if( !PyArg_ParseTuple(args, "II|Of", &u1, &u2, &obj, &f) ) { + if( !PyArg_ParseTuple(args, "II|O!f", &u1, &u2, &IntegrationType_Type, &obj, &f) ) { cout << "ERROR: GetDirectionalViewMapDensityF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetDirectionalViewMapDensityF1D(u1, u2, t, f); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp index 9832053f11b..c6ae8099cec 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedXF1D.cpp @@ -104,12 +104,12 @@ int GetProjectedXF1D___init__( BPy_GetProjectedXF1D* self, PyObject *args ) { PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O", &obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: GetProjectedXF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedXF1D(t); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp index 83b7c82691d..bf466a7b674 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedYF1D.cpp @@ -104,12 +104,12 @@ int GetProjectedYF1D___init__( BPy_GetProjectedYF1D* self, PyObject *args ) { PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O", &obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: GetProjectedYF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedYF1D(t); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp index 78f8dccc4c7..423f6e2e892 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetProjectedZF1D.cpp @@ -104,12 +104,12 @@ int GetProjectedZF1D___init__( BPy_GetProjectedZF1D* self, PyObject *args ) { PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O", &obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: GetProjectedZF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedZF1D(t); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp index 3960cc91456..da36fb3c4f1 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetSteerableViewMapDensityF1D.cpp @@ -106,12 +106,12 @@ int GetSteerableViewMapDensityF1D___init__( BPy_GetSteerableViewMapDensityF1D* s int i; float f = 2.0; - if( !PyArg_ParseTuple(args, "i|Of", &i, &obj, &f) ) { + if( !PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) ) { cout << "ERROR: GetSteerableViewMapDensityF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetSteerableViewMapDensityF1D(i,t,f); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp index 6549e0bf2ce..c14aa0cf1a3 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetViewMapGradientNormF1D.cpp @@ -106,12 +106,12 @@ int GetViewMapGradientNormF1D___init__( BPy_GetViewMapGradientNormF1D* self, PyO int i; float f = 2.0; - if( !PyArg_ParseTuple(args, "i|Of", &i, &obj, &f) ) { + if( !PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) ) { cout << "ERROR: GetViewMapGradientNormF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetViewMapGradientNormF1D(i,t,f); return 0; diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp index d7c4c82639d..a426319d816 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetXF1D.cpp @@ -104,12 +104,12 @@ int GetXF1D___init__( BPy_GetXF1D* self, PyObject *args ) { PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O", &obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: GetXF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetXF1D(t); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp index cb4cf1c01b1..bd781cc4d36 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetYF1D.cpp @@ -104,12 +104,12 @@ int GetYF1D___init__( BPy_GetYF1D* self, PyObject *args ) { PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O", &obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: GetYF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetYF1D(t); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp index 02a6a9aaa5d..fa840043c77 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_GetZF1D.cpp @@ -104,12 +104,12 @@ int GetZF1D___init__( BPy_GetZF1D* self, PyObject *args ) { PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O", &obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: GetZF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::GetZF1D(t); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp index 9623b9d6fc6..fa15546ba3a 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_LocalAverageDepthF1D.cpp @@ -105,12 +105,12 @@ int LocalAverageDepthF1D___init__( BPy_LocalAverageDepthF1D* self, PyObject *arg PyObject *obj = 0; double d; - if( !PyArg_ParseTuple(args, "d|O", &d, &obj) ) { + if( !PyArg_ParseTuple(args, "d|O!", &d, &IntegrationType_Type, &obj) ) { cout << "ERROR: LocalAverageDepthF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::LocalAverageDepthF1D(d,t); return 0; } diff --git a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp index 17ddcda299a..7667b88c304 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction1D/UnaryFunction1D_double/BPy_ZDiscontinuityF1D.cpp @@ -104,12 +104,12 @@ int ZDiscontinuityF1D___init__( BPy_ZDiscontinuityF1D* self, PyObject *args ) { PyObject *obj = 0; - if( !PyArg_ParseTuple(args, "|O", &obj) ) { + if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { cout << "ERROR: ZDiscontinuityF1D___init__ " << endl; return -1; } - IntegrationType t = ( obj && BPy_IntegrationType_Check(obj) ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; + IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; self->py_uf1D_double.uf1D_double = new Functions1D::ZDiscontinuityF1D(t); return 0; } |