ArgValue = Result ;
}
if ( !PyFloat_Check( ArgValue ) ) {
- cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (float)" << endl ;
- RetVal = false ;
+ // mkr : bug PAL12454
+ if ( PyLong_Check( ArgValue ) ) {
+ cdebug << "ArgOut" << i << " : " << sname << " " << method << " OK (long)" << endl ;
+ long l = PyLong_AsLong( ArgValue );
+ f = (float) l;
+ }
+ else if ( PyInt_Check( ArgValue ) ) {
+ cdebug << "ArgOut" << i << " : " << sname << " " << method << " OK (int)" << endl ;
+ long l = PyInt_AsLong( ArgValue );
+ f = (float) l;
+ }
+ else {
+ cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (float)" << endl ;
+ RetVal = false ;
+ }
}
else {
f = PyFloat_AsDouble( ArgValue ) ;
ArgValue = Result ;
}
if ( !PyFloat_Check( ArgValue ) ) {
- cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (double)" << endl ;
- RetVal = false ;
+ // mkr : bug PAL12454
+ if ( PyLong_Check( ArgValue ) ) {
+ cdebug << "ArgOut" << i << " : " << sname << " " << method << " OK (long)" << endl ;
+ long l = PyLong_AsLong( ArgValue );
+ d = (double) l;
+ }
+ else if ( PyInt_Check( ArgValue ) ) {
+ cdebug << "ArgOut" << i << " : " << sname << " " << method << " OK (int)" << endl ;
+ long l = PyInt_AsLong( ArgValue );
+ d = (double) l;
+ }
+ else {
+ cdebug << "ArgOut" << i << " : " << sname << " " << method << " ERROR (float)" << endl ;
+ RetVal = false ;
+ }
}
else {
d = PyFloat_AsDouble( ArgValue ) ;