* Fixed uninitialized pointers in "__init__" methods of UnaryFunction1D types.

There was a known issue for a long time that we occasionally encountered
strange "TypeError: an integer is required" and "RuntimeWarning: tp_compare
didn't return -1 or -2 for exception", as shown in the following unit test
log.  The source of the former error was PyInt_AsLong(obj) being used by
IntegrationType_from_BPy_IntegrationType(obj), where "obj" was not properly
initialized in "__init__" before the converter was called.  The TypeError
was left unattended for a while and showed up when a comparison occurred
and the TypeError was detected, which resulted in the latter warning.

> runTest (__main__.UnaryFunction1DDoubleInitTestCase) ...
> .\blender:211: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
> ERROR
> 
> ======================================================================
> ERROR: runTest (__main__.UnaryFunction1DDoubleInitTestCase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "init_tests.py", line 211, in runTest
> TypeError: an integer is required
> 
> ----------------------------------------------------------------------

* Also removed unnecessary error messages in "__init__" methods of
UnaryFunction1D types.
This commit is contained in:
2009-08-03 14:38:15 +00:00
parent e2eb4d567c
commit d4ff63fe20
27 changed files with 35 additions and 89 deletions

View File

@@ -217,12 +217,10 @@ PyMODINIT_FUNC UnaryFunction1DDouble_Init( PyObject *module ) {
int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble* self, PyObject *args) int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble* self, PyObject *args)
{ {
PyObject *obj; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: UnaryFunction1DDouble___init__ " << endl;
return -1; return -1;
}
if( !obj ) if( !obj )
self->uf1D_double = new UnaryFunction1D<double>(); self->uf1D_double = new UnaryFunction1D<double>();

View File

@@ -138,12 +138,10 @@ PyMODINIT_FUNC UnaryFunction1DEdgeNature_Init( PyObject *module ) {
int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature* self, PyObject *args) int UnaryFunction1DEdgeNature___init__(BPy_UnaryFunction1DEdgeNature* self, PyObject *args)
{ {
PyObject *obj; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: UnaryFunction1DEdgeNature___init__ " << endl;
return -1; return -1;
}
if( !obj ) if( !obj )
self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>(); self->uf1D_edgenature = new UnaryFunction1D<Nature::EdgeNature>();

View File

@@ -131,12 +131,10 @@ PyMODINIT_FUNC UnaryFunction1DFloat_Init( PyObject *module ) {
int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat* self, PyObject *args) int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat* self, PyObject *args)
{ {
PyObject *obj; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: UnaryFunction1DFloat___init__ " << endl;
return -1; return -1;
}
if( !obj ) if( !obj )
self->uf1D_float = new UnaryFunction1D<float>(); self->uf1D_float = new UnaryFunction1D<float>();

View File

@@ -138,12 +138,10 @@ PyMODINIT_FUNC UnaryFunction1DUnsigned_Init( PyObject *module ) {
int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned* self, PyObject *args) int UnaryFunction1DUnsigned___init__(BPy_UnaryFunction1DUnsigned* self, PyObject *args)
{ {
PyObject *obj; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: UnaryFunction1DUnsigned___init__ " << endl;
return -1; return -1;
}
if( !obj ) if( !obj )
self->uf1D_unsigned = new UnaryFunction1D<unsigned int>(); self->uf1D_unsigned = new UnaryFunction1D<unsigned int>();

View File

@@ -144,12 +144,10 @@ PyMODINIT_FUNC UnaryFunction1DVec2f_Init( PyObject *module ) {
int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f* self, PyObject *args) int UnaryFunction1DVec2f___init__(BPy_UnaryFunction1DVec2f* self, PyObject *args)
{ {
PyObject *obj; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: UnaryFunction1DVec2f___init__ " << endl;
return -1; return -1;
}
if( !obj ) if( !obj )
self->uf1D_vec2f = new UnaryFunction1D<Vec2f>(); self->uf1D_vec2f = new UnaryFunction1D<Vec2f>();

View File

@@ -138,12 +138,10 @@ PyMODINIT_FUNC UnaryFunction1DVec3f_Init( PyObject *module ) {
int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args) int UnaryFunction1DVec3f___init__(BPy_UnaryFunction1DVec3f* self, PyObject *args)
{ {
PyObject *obj; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: UnaryFunction1DVec3f___init__ " << endl;
return -1; return -1;
}
if( !obj ) if( !obj )
self->uf1D_vec3f = new UnaryFunction1D<Vec3f>(); self->uf1D_vec3f = new UnaryFunction1D<Vec3f>();

View File

@@ -151,12 +151,10 @@ PyMODINIT_FUNC UnaryFunction1DVectorViewShape_Init( PyObject *module ) {
int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape* self, PyObject *args) int UnaryFunction1DVectorViewShape___init__(BPy_UnaryFunction1DVectorViewShape* self, PyObject *args)
{ {
PyObject *obj; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: UnaryFunction1DVectorViewShape___init__ " << endl;
return -1; return -1;
}
if( !obj ) if( !obj )
self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector<ViewShape*> >(); self->uf1D_vectorviewshape = new UnaryFunction1D< std::vector<ViewShape*> >();

View File

@@ -152,12 +152,10 @@ PyMODINIT_FUNC UnaryFunction1DVoid_Init( PyObject *module ) {
int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid* self, PyObject *args) int UnaryFunction1DVoid___init__(BPy_UnaryFunction1DVoid* self, PyObject *args)
{ {
PyObject *obj; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: UnaryFunction1DVoid___init__ " << endl;
return -1; return -1;
}
if( !obj ) if( !obj )
self->uf1D_void = new UnaryFunction1D_void(); self->uf1D_void = new UnaryFunction1D_void();

View File

@@ -104,10 +104,8 @@ int CurveNatureF1D___init__( BPy_CurveNatureF1D* self, PyObject *args)
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: CurveNatureF1D___init__" << endl;
return -1; return -1;
}
IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t); self->py_uf1D_edgenature.uf1D_edgenature = new Functions1D::CurveNatureF1D(t);

View File

@@ -104,10 +104,8 @@ int Normal2DF1D___init__( BPy_Normal2DF1D* self, PyObject *args)
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: Normal2DF1D___init__" << endl;
return -1; return -1;
}
IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Normal2DF1D(t); self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Normal2DF1D(t);

View File

@@ -104,10 +104,8 @@ int Orientation2DF1D___init__( BPy_Orientation2DF1D* self, PyObject *args)
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: Orientation2DF1D___init__" << endl;
return -1; return -1;
}
IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Orientation2DF1D(t); self->py_uf1D_vec2f.uf1D_vec2f = new Functions1D::Orientation2DF1D(t);

View File

@@ -104,10 +104,8 @@ int Orientation3DF1D___init__( BPy_Orientation3DF1D* self, PyObject *args)
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: Orientation3DF1D___init__" << endl;
return -1; return -1;
}
IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
self->py_uf1D_vec3f.uf1D_vec3f = new Functions1D::Orientation3DF1D(t); self->py_uf1D_vec3f.uf1D_vec3f = new Functions1D::Orientation3DF1D(t);

View File

@@ -104,10 +104,8 @@ int Curvature2DAngleF1D___init__( BPy_Curvature2DAngleF1D* self, PyObject *args)
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: Curvature2DAngleF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::Curvature2DAngleF1D(t);

View File

@@ -106,10 +106,8 @@ int DensityF1D___init__( BPy_DensityF1D* self, PyObject *args)
double d = 2.0; double d = 2.0;
float f = 2.0; float f = 2.0;
if( !PyArg_ParseTuple(args, "|dO!f", &d, &IntegrationType_Type, &obj, &f) ) { if( !PyArg_ParseTuple(args, "|dO!f", &d, &IntegrationType_Type, &obj, &f) )
cout << "ERROR: DensityF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::DensityF1D(d,t,f);

View File

@@ -106,10 +106,8 @@ int GetCompleteViewMapDensityF1D___init__( BPy_GetCompleteViewMapDensityF1D* sel
unsigned i; unsigned i;
float f = 2.0; float f = 2.0;
if( !PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) ) { if( !PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) )
cout << "ERROR: GetCompleteViewMapDensityF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetCompleteViewMapDensityF1D(i,t,f);

View File

@@ -106,10 +106,8 @@ int GetDirectionalViewMapDensityF1D___init__( BPy_GetDirectionalViewMapDensityF1
unsigned int u1, u2; unsigned int u1, u2;
float f = 2.0; float f = 2.0;
if( !PyArg_ParseTuple(args, "II|O!f", &u1, &u2, &IntegrationType_Type, &obj, &f) ) { if( !PyArg_ParseTuple(args, "II|O!f", &u1, &u2, &IntegrationType_Type, &obj, &f) )
cout << "ERROR: GetDirectionalViewMapDensityF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetDirectionalViewMapDensityF1D(u1, u2, t, f);

View File

@@ -104,10 +104,8 @@ int GetProjectedXF1D___init__( BPy_GetProjectedXF1D* self, PyObject *args )
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: GetProjectedXF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedXF1D(t);

View File

@@ -104,10 +104,8 @@ int GetProjectedYF1D___init__( BPy_GetProjectedYF1D* self, PyObject *args )
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: GetProjectedYF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedYF1D(t);

View File

@@ -104,10 +104,8 @@ int GetProjectedZF1D___init__( BPy_GetProjectedZF1D* self, PyObject *args )
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: GetProjectedZF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetProjectedZF1D(t);

View File

@@ -106,10 +106,8 @@ int GetSteerableViewMapDensityF1D___init__( BPy_GetSteerableViewMapDensityF1D* s
int i; int i;
float f = 2.0; float f = 2.0;
if( !PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) ) { if( !PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) )
cout << "ERROR: GetSteerableViewMapDensityF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetSteerableViewMapDensityF1D(i,t,f);

View File

@@ -106,10 +106,8 @@ int GetViewMapGradientNormF1D___init__( BPy_GetViewMapGradientNormF1D* self, PyO
int i; int i;
float f = 2.0; float f = 2.0;
if( !PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) ) { if( !PyArg_ParseTuple(args, "i|O!f", &i, &IntegrationType_Type, &obj, &f) )
cout << "ERROR: GetViewMapGradientNormF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetViewMapGradientNormF1D(i,t,f);

View File

@@ -104,10 +104,8 @@ int GetXF1D___init__( BPy_GetXF1D* self, PyObject *args )
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: GetXF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetXF1D(t);

View File

@@ -104,10 +104,8 @@ int GetYF1D___init__( BPy_GetYF1D* self, PyObject *args )
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: GetYF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetYF1D(t);

View File

@@ -104,10 +104,8 @@ int GetZF1D___init__( BPy_GetZF1D* self, PyObject *args )
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: GetZF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::GetZF1D(t);

View File

@@ -105,10 +105,8 @@ int LocalAverageDepthF1D___init__( BPy_LocalAverageDepthF1D* self, PyObject *arg
PyObject *obj = 0; PyObject *obj = 0;
double d; double d;
if( !PyArg_ParseTuple(args, "d|O!", &d, &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "d|O!", &d, &IntegrationType_Type, &obj) )
cout << "ERROR: LocalAverageDepthF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::LocalAverageDepthF1D(d,t);

View File

@@ -104,10 +104,8 @@ int ZDiscontinuityF1D___init__( BPy_ZDiscontinuityF1D* self, PyObject *args )
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: ZDiscontinuityF1D___init__ " << endl;
return -1; return -1;
}
IntegrationType t = ( 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); self->py_uf1D_double.uf1D_double = new Functions1D::ZDiscontinuityF1D(t);

View File

@@ -104,10 +104,8 @@ int QuantitativeInvisibilityF1D___init__( BPy_QuantitativeInvisibilityF1D* self,
{ {
PyObject *obj = 0; PyObject *obj = 0;
if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) ) { if( !PyArg_ParseTuple(args, "|O!", &IntegrationType_Type, &obj) )
cout << "ERROR: QuantitativeInvisibilityF1D___init__" << endl;
return -1; return -1;
}
IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN; IntegrationType t = ( obj ) ? IntegrationType_from_BPy_IntegrationType(obj) : MEAN;
self->py_uf1D_unsigned.uf1D_unsigned = new Functions1D::QuantitativeInvisibilityF1D(t); self->py_uf1D_unsigned.uf1D_unsigned = new Functions1D::QuantitativeInvisibilityF1D(t);