]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Fix for bug PAL12255 : Porting problem: Invalid shape as a result of "NewGraphGeomEss...
authormkr <mkr@opencascade.com>
Thu, 18 May 2006 13:44:02 +0000 (13:44 +0000)
committermkr <mkr@opencascade.com>
Thu, 18 May 2006 13:44:02 +0000 (13:44 +0000)
adm_local/unix/make_commence.in
configure.in.base
src/GraphBase/DataFlowBase_DataPort.cxx
src/GraphBase/DataFlowBase_XmlHandler.cxx
src/GraphBase/Makefile.in
src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx
src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx
src/GraphExecutor/Makefile.in

index cbea1675763d46532411cfbbe86c8406ad699744..b63301d57213ab4c31ed71391035da830ce62988 100644 (file)
@@ -19,6 +19,8 @@ LDFLAGSFORBIN+= -lstdc++
 
 CP=@CP@
 
+OS=@OS@
+
 # CPP
 
 CPP=@CPP@
@@ -238,13 +240,7 @@ all:
 Makefile: $(top_builddir)/config.status $(srcdir)/Makefile.in
        cd $(top_builddir) ; ./config.status
 
-LOCAL_MAKE = make_commence make_omniorb
-
-KERNEL_MAKE = make_module make_conclude depend SALOMEconfig.h F77config.h sstream envScript
-
-$(top_builddir)/config.status: $(top_srcdir)/configure \
-                              $(LOCAL_MAKE:%=$(top_srcdir)/adm_local/unix/%.in) \
-                              $(KERNEL_MAKE:%=$(KERNEL_ROOT_DIR)/salome_adm/unix/%.in)
+$(top_builddir)/config.status: $(top_srcdir)/configure
        cd $(top_builddir) ; ./config.status --recheck
 
 # VPATH contain $(srcdir), so make configure is good in top_srcdir and we must add target configure otherwise :-)
@@ -259,7 +255,7 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base
        cd $(top_srcdir) && ./build_configure
 
 
-ACLOCAL_KERNEL = \
+ACLOCAL_SRC = \
 ac_cxx_bool.m4                    check_corba.m4                       \
 ac_cxx_depend_flag.m4             check_hdf5.m4      enable_pthreads.m4        \
 ac_cxx_mutable.m4                 check_mico.m4      libtool.m4                \
@@ -272,8 +268,7 @@ ACLOCAL_GUI = \
 check_vtk.m4                     check_opengl.m4    check_qt.m4       \
 check_GUI.m4                      check_corba_in_GUI.m4 
 
-$(top_srcdir)/aclocal.m4: $(ACLOCAL_KERNEL:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
+$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
                           $(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%)
-       cd $(top_srcdir) ; aclocal -I adm_local/unix/config_files \
-                                   -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
-                                  -I @GUI_ROOT_DIR@/adm_local/unix/config_files
+       cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
+                                                                      -I @GUI_ROOT_DIR@/adm_local/unix/config_files
index 05fcae2f4c34ee0c4bacffb5b3fa759fa0e9b689..0749b450ea33c175aad7ad0315867ea908fbc113 100644 (file)
@@ -53,6 +53,11 @@ dnl Export the AR macro so that it will be placed in the libtool file
 dnl correctly.
 export AR
 
+if test `uname -r` = "2.4.18-14" || test `uname -r` = "2.4.20-20.8"; then
+    export OS="REDHAT"
+fi
+AC_SUBST(OS)
+
 echo
 echo ---------------------------------------------
 echo testing make
index f559b3c5ed473bed0bdc6d3a9a892bba821f937f..8208f93501c06b5ecc224a8091017aac38a00c4b 100644 (file)
@@ -91,15 +91,22 @@ void GraphBase::DataPort::InitialValues(CORBA::Any aValue ) {
   }
   else if ( !strcmp( Type , "float" ) ) {
     cdebug << "float" << endl ;
+#ifdef REDHAT // mkr : debug for PAL12255
+    InitialValue <<= (double ) 0. ;
+#else     
     double d = 0.;
     InitialValue.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-    //InitialValue <<= (double ) 0. ;
+#endif
+    
   }
   else if ( !strcmp( Type , "double" ) ) {
     cdebug << "double" << endl ;
+#ifdef REDHAT // mkr : debug for PAL12255
+    InitialValue <<= (double ) 0. ;
+#else
     double d = 0.;
     InitialValue.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-    //InitialValue <<= (double ) 0. ;
+#endif
   }
   else { // Default
     cdebug << "objref" << endl ;
@@ -169,8 +176,11 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) {
       else if ( !strcmp( Type , "float" ) || !strcmp( Type , "double" ) ) {
        double d ;
        sscanf( t , "%lf" , &d ) ;
+#ifdef REDHAT // mkr : debug for PAL12255
+       *theValue <<= d ;
+#else
        theValue->replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-        //*theValue <<= d ;
+#endif
         *theValue >>= d ;
 #if ValueTrace
         cdebug << " --> Value( " << d << ") (double) kind " << theValue->type()->kind() ;
@@ -235,8 +245,11 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) {
       }
       else if ( !strcmp( Type , "float" ) || !strcmp( Type , "double" ) ) {
         double d = l ;
+#ifdef REDHAT // mkr : debug for PAL12255
+       *theValue <<= d ;
+#else
        theValue->replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-        //*theValue <<= d ;
+#endif
         *theValue >>= d ;
 
 #if ValueTrace
@@ -379,9 +392,12 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) {
 #endif
       }
       else if ( !strcmp( Type , "float" ) || !strcmp( Type , "double" ) ) {
-        double d = (double ) 0. ;
+       double d = (double ) 0. ;
+#ifdef REDHAT // mkr : debug for PAL12255
+       *theValue <<= d ;
+#else
        theValue->replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-        //*theValue <<= d ;
+#endif
         *theValue >>= d;
 #if ValueTrace
         cdebug << " --> Value( " << d << ") (double) kind " << theValue->type()->kind() ;
index 2c8dcda4946cadd8a745cec44a3c58263ccf6384..7ed3dffd5775a7b261b696cd099adff1de895afd 100644 (file)
@@ -726,9 +726,12 @@ bool GraphBase::XmlHandler::endElement( const QString&,
               break;
            }
             case CORBA::tk_double: {
-              //aLink.aLinkValue <<= (double ) 0. ;
              double d = 0.;
+#ifdef REDHAT // mkr : debug for PAL12255
+             aLink.aLinkValue <<= (double ) 0. ;
+#else
              aLink.aLinkValue.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
+#endif
               aLink.aLinkValue >>= d;
 #if TRACE
               MESSAGE( d << " (double)" );
@@ -784,9 +787,13 @@ bool GraphBase::XmlHandler::endElement( const QString&,
               case CORBA::tk_double: {
                 double d;
                 sscanf( fieldvalue[depth].c_str() , "%lf" , &d ) ;
-                //aLink.aLinkValue <<= d;
+#ifdef REDHAT // mkr : debug for PAL12255
+               aLink.aLinkValue <<= d;
+               aLinkValue <<= d;
+#else
                aLink.aLinkValue.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
                aLinkValue.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
+#endif         
                aLinkDoubleValue = new CORBA::Any( aLinkValue );
 #if TRACE
                MESSAGE( d << " (double)" );
index c61a47a955b8ebc989b80253cd23910472adbd51..42a65e86311d2d2f8037615289c6cd6f74f1f4c6 100644 (file)
@@ -103,6 +103,11 @@ CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES)
        -I${KERNEL_ROOT_DIR}/include/salome
 CXXFLAGS+= -g -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \
        -I${KERNEL_ROOT_DIR}/include/salome
+
+ifeq ($(OS),REDHAT)
+       CXXFLAGS+= -DREDHAT
+endif
+
 LDFLAGS= -L../../lib/salome $(CORBA_LIBS) -lSalomeNS -lSalomeLifeCycleCORBA -lOpUtil -lSALOMELocalTrace \
        -lc $(PYTHON_LIBS) $(QT_MT_LIBS) $(OGL_LIBS) \
        -L${KERNEL_ROOT_DIR}/lib/salome
index d5bfc533ef18d20f571f1f9524d4403754a2ae8f..900839a6f9865d9ffe32ac6c348ca0fb8c22e5b8 100644 (file)
@@ -3269,8 +3269,11 @@ void GraphExecutor::InNode::InParametersSet( bool & Err ,
           double d ;
           sscanf( t , "%lf" , &d ) ;
           float f = d ;
-          D.Value.replace(CORBA::TypeCode::PR_float_tc(), (void*)(&f));
-//        D.Value <<= f ;
+#ifdef REDHAT // mkr : debug for PAL12255
+          D.Value <<= f ;
+#else
+         D.Value.replace(CORBA::TypeCode::PR_float_tc(), (void*)(&f));
+#endif
 #if InParametersSetTrace
           cdebug << "string '" << t << "' --> " << setw(25) << setprecision(18) << d << " --> float " << " = "
                  << setw(25) << setprecision(18) << f ;
@@ -3280,8 +3283,11 @@ void GraphExecutor::InNode::InParametersSet( bool & Err ,
         else if ( !strcmp( Type , "double" ) ) {
           double d ;
           sscanf( t , "%lf" , &d ) ;
-          D.Value.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-//        D.Value <<= d ;
+#ifdef REDHAT // mkr : debug for PAL12255
+          D.Value <<= d ;
+#else
+         D.Value.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
+#endif
 #if InParametersSetTrace
           cdebug << "string '" << t << " --> double " << setw(25) << setprecision(18) << d ;
 #endif
@@ -3348,15 +3354,21 @@ void GraphExecutor::InNode::InParametersSet( bool & Err ,
         else if ( !strcmp( Type , "float" ) ) {
           float f ;
           f = (float ) l ;
-          D.Value.replace(CORBA::TypeCode::PR_float_tc(), (void*)(&f));
-//        D.Value <<= f ;
+#ifdef REDHAT // mkr : debug for PAL12255
+          D.Value <<= f ;
+#else
+         D.Value.replace(CORBA::TypeCode::PR_float_tc(), (void*)(&f));
+#endif
 //          theOutPort->Value( D.Value ) ;
         }
         else if ( !strcmp( Type , "double" ) ) {
           double d ;
           d = (double ) l ;
+#ifdef REDHAT // mkr : debug for PAL12255
+          D.Value <<= d ;
+#else
           D.Value.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-//        D.Value <<= d ;
+#endif
 //          theOutPort->Value( D.Value ) ;
         }
 //        else if ( !strcmp( Type , "objref" ) ) {
@@ -3410,8 +3422,11 @@ void GraphExecutor::InNode::InParametersSet( bool & Err ,
         else if ( !strcmp( Type , "float" ) ) {
           float f ;
           f = (float ) d ;
+#ifdef REDHAT // mkr : debug for PAL12255
+          D.Value <<= f ;
+#else
           D.Value.replace(CORBA::TypeCode::PR_float_tc(), (void*)(&f));
-//        D.Value <<= f ;
+#endif
 //          theOutPort->Value( D.Value ) ;
         }
         else if ( !strcmp( Type , "double" ) ) {
@@ -3471,14 +3486,20 @@ void GraphExecutor::InNode::InParametersSet( bool & Err ,
         }
         else if ( !strcmp( Type , "float" ) ) {
           float f = 0 ;
+#ifdef REDHAT // mkr : debug for PAL12255
+          D.Value <<= f ;
+#else
           D.Value.replace(CORBA::TypeCode::PR_float_tc(), (void*)(&f));
-//        D.Value <<= f ;
+#endif
 //          theOutPort->Value( D.Value ) ;
         }
         else if ( !strcmp( Type , "double" ) ) {
           double d = 0 ;
+#ifdef REDHAT // mkr : debug for PAL12255
+          D.Value <<= d ;
+#else
           D.Value.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-//        D.Value <<= d ;
+#endif
 //          theOutPort->Value( D.Value ) ;
         }
 //        else if ( !strcmp( Type , "objref" ) ) {
@@ -3566,13 +3587,19 @@ void GraphExecutor::InNode::InOutParametersSet( int nOutParams ,
     }
     else if ( !strcmp( Type , "float" ) ) {
       float f = 0 ;
+#ifdef REDHAT // mkr : debug for PAL12255
+      D.Value <<= f ;
+#else
       D.Value.replace(CORBA::TypeCode::PR_float_tc(), (void*)(&f));
-//    D.Value <<= f ;
+#endif
     }
     else if ( !strcmp( Type , "double" ) ) {
       double d = 0 ;
+#ifdef REDHAT // mkr : debug for PAL12255
+      D.Value <<= d ;
+#else
       D.Value.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-//    D.Value <<= d ;
+#endif
     }
     else {
       D.Value <<= CORBA::Object::_nil() ;
@@ -3718,8 +3745,11 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err ,
           float f;
           D.Value >>= f;
           double d = (double ) f ;
+#ifdef REDHAT // mkr : debug for PAL12255
+          D.Value <<= d ;
+#else
           D.Value.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-//        D.Value <<= d ;
+#endif
 #if OutParametersSetTrace
           cdebug << ThreadNo() << " " << f << "(float)" << endl ;
 #endif
index 09dcf693056f7f8ed56b084e2ca18280e8e4d853..c55437b4643f0b2feda46487fa53a839e3eec945 100644 (file)
@@ -40,15 +40,6 @@ bool GraphExecutor::InNode::InitPython() {
     Py_InitModule( "InitPyRunMethod" , MethodPyRunMethod ) ;
     // asv : 20.01.05 : changes involved with switching to old (HEAD) KERNEL    
     //_OutNode->SuperVisionContainer()->ActivatePythonExecution( "InitPyRunMethod" , MethodPyRunMethod ) ;
-
-    // PAL10310: patch on omniORB
-    string aPyFunc;
-    aPyFunc = "import omnipatch\n" ;
-    if ( PyRun_SimpleString( (char *) aPyFunc.c_str() ) ) {
-      cdebug << ThreadNo() << " " << Name() << " PyRun_SimpleString ERROR " << endl << aPyFunc << endl ;
-      Automaton()->PyUnLock() ;
-      return false ;
-    }
   }
 //  PyObject * Dictionnary = PyModule_GetDict( Module ) ;
 //  InitPyDynInvokeError = PyErr_NewException( "InitPyDynInvokeError" , NULL , NULL ) ;
@@ -92,9 +83,8 @@ bool GraphExecutor::InNode::InitPython() {
     aPyFunc += "import sys\n" ;
     aPyFunc += "import CORBA\n" ;
     aPyFunc += "import omniORB\n" ;
-    aPyFunc += "orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ;
     aPyFunc += "def PyObjRef( IORObjStr ) :\n" ;
-    //    aPyFunc += "    orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ;
+    aPyFunc += "    orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ;
     aPyFunc += "    objref = orb.string_to_object( IORObjStr )\n" ;
     aPyFunc += "    return objref\n" ;
     aPyFunc += "InitPyRunMethod.RunMethod( PyObjRef )\n" ;
@@ -119,9 +109,8 @@ bool GraphExecutor::InNode::InitPython() {
     aPyFunc += "import sys\n" ;
     aPyFunc += "import CORBA\n" ;
     aPyFunc += "import omniORB\n" ;
-    aPyFunc += "orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ;
     aPyFunc += "def PyObjIor( ObjRef ) :\n" ;
-    //    aPyFunc += "    orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ;
+    aPyFunc += "    orb = CORBA.ORB_init( sys.argv , CORBA.ORB_ID )\n" ;
     aPyFunc += "    objIor = orb.object_to_string( ObjRef )\n" ;
     aPyFunc += "    return objIor\n" ;
     aPyFunc += "InitPyRunMethod.RunMethod( PyObjIor )\n" ;
@@ -168,21 +157,7 @@ PyObject * GraphExecutor::InNode::InitPyDynInvoke( char * PyFuncName ,
 
   if ( strlen( PyFuncName ) ) {
     Automaton()->PyLock() ;
-
     thePyRunMethod = Automaton()->PyFunction( PyFuncName ) ;
-
-    //thePyRunMethod = NULL; 
-    // asv 28.02.05 : VERY BAD fix of the following problem: after change of a function, 
-    // the changes are NOT taken into account by Automation - it returns PyObject of the OLD function.
-    // so here we force re-automating the PyObject EVERY TIME, regardless if the function has changed or not.
-    // Once again - it is a very bad solution, it fully discards the whole idea of automation,
-    // here is it done as a quick fix for a bug. 
-    // A better solution (to be implemented): store the PyObject NOT in Automation map, but in
-    // InLine node itself!  And if the method is changed - remove the PyObject and force to regenerate it.
-    // But this means that PyObject must be stored in Editor's data model.
-    // asv 01.03.05 : the fix is not needed, the described bug is not reproduced.  To investigate:
-    // WHERE PyObject is removed from Automation map on function change. 
-
     if ( (*aPythonFunction).length() ) {
       if ( thePyRunMethod == NULL ) {
        unsigned int i ;
@@ -286,9 +261,9 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
   PyObject * ArgsList = NULL ;
   PyObject * ArgValue = NULL ;
   PyObject * Result = NULL ;
-  //PyObject * MyPyObjRefList = NULL ;
+  PyObject * MyPyObjRefList = NULL ;
   PyObject * ResultObj = NULL ;
-  //PyObject * MyPyObjIorList = NULL ;
+  PyObject * MyPyObjIorList = NULL ;
   PyObject * ResultIor = NULL ;
 
   CORBA::Object_ptr ObjRef ;
@@ -395,27 +370,27 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
         break ;
       }
       case CORBA::tk_objref : {
-        //MyPyObjRefList = PyTuple_New( 1 ) ;
-        //PyObject * ObjValue ;
+        MyPyObjRefList = PyTuple_New( 1 ) ;
+        PyObject * ObjValue ;
 #if OMNIORB_VERSION >= 4
         data >>= (CORBA::Any::to_object ) ObjRef ;
 #else
         data >>= ObjRef ;
 #endif
         IORObjRef = ObjectToString( ObjRef ) ;
-        //ObjValue = Py_BuildValue( "s" , IORObjRef ) ;
-        //PyTuple_SetItem( MyPyObjRefList , 0 , ObjValue ) ;
+        ObjValue = Py_BuildValue( "s" , IORObjRef ) ;
+        PyTuple_SetItem( MyPyObjRefList , 0 , ObjValue ) ;
 #if PyDynInvokeTrace
-        cdebug << "ArgIn" << i << " : " << sname << " " << method << " " << " Value " << IORObjRef << " (objref) "<< endl ;
-       //               << MyPyObjRef->ob_refcnt << "/" << MyPyObjRefList->ob_refcnt << endl ;
+        cdebug << "ArgIn" << i << " : " << sname << " " << method << " " << " Value " << IORObjRef << " (objref) "
+               << MyPyObjRef->ob_refcnt << "/" << MyPyObjRefList->ob_refcnt << endl ;
 #endif
 //        ResultObj = PyEval_CallObject( MyPyObjRef , MyPyObjRefList ) ;
-        //ResultObj = PyEvalCallObject( "PyObjRef" , MyPyObjRef , MyPyObjRefList ) ;
+        ResultObj = PyEvalCallObject( "PyObjRef" , MyPyObjRef , MyPyObjRefList ) ;
 #if PyDynInvokeTrace
-        //cdebug << "ObjValue->ob_refcnt" << ObjValue->ob_refcnt << endl ;
+        cdebug << "ObjValue->ob_refcnt" << ObjValue->ob_refcnt << endl ;
 #endif
-        //ArgValue = Py_BuildValue( "O" , ResultObj ) ;
-        //PyTuple_SetItem( ArgsList , i , ArgValue ) ;
+        ArgValue = Py_BuildValue( "O" , ResultObj ) ;
+        PyTuple_SetItem( ArgsList , i , ArgValue ) ;
 #if PyDynInvokeTrace
        if ( ArgValue )
          cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value  (objref) ArgsList->ob_refcnt"
@@ -423,33 +398,22 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
        else
          cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value  (objref) ArgsList->ob_refcnt"
                 << ArgsList->ob_refcnt << " ArgValue is NULL" << endl ;
-        //cdebug << "MyPyObjRefList->ob_refcnt " << MyPyObjRefList->ob_refcnt-1 << endl ;
-#endif
-       ResultObj = PyObject_CallFunction( MyPyObjRef , "s",IORObjRef ) ;
-       if(ResultObj == NULL){
-         PyErr_Print();
-         ResultObj=Py_None;
-          Py_INCREF(ResultObj) ;
-       }
-        PyTuple_SetItem( ArgsList , i , ResultObj ) ;
-        cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value  (objref) ArgsList->ob_refcnt"
-              << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" << ResultObj->ob_refcnt << endl ;
-//       << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" << ArgValue->ob_refcnt << endl ;
-        //cdebug << "MyPyObjRefList->ob_refcnt " << MyPyObjRefList->ob_refcnt-1 << endl ;
-        //Py_DECREF( MyPyObjRefList ) ;
-        //if ( CORBA::is_nil( ObjRef ) ) {
-        //  ResultObj = NULL ;
-        //}
-        //else {
-       //#if PyDynInvokeTrace
-       //if ( ResultObj )
-       //cdebug << "ResultObj->ob_refcnt " << ResultObj->ob_refcnt-1 << endl ;
-       //else
-       //cdebug << "ResultObj is NULL" << endl ;
-       //#endif
-       //if ( ResultObj )
-       //Py_DECREF( ResultObj ) ;
-        //}
+        cdebug << "MyPyObjRefList->ob_refcnt " << MyPyObjRefList->ob_refcnt-1 << endl ;
+#endif
+        Py_DECREF( MyPyObjRefList ) ;
+        if ( CORBA::is_nil( ObjRef ) ) {
+          ResultObj = NULL ;
+        }
+        else {
+#if PyDynInvokeTrace
+         if ( ResultObj )
+           cdebug << "ResultObj->ob_refcnt " << ResultObj->ob_refcnt-1 << endl ;
+         else
+           cdebug << "ResultObj is NULL" << endl ;
+#endif
+         if ( ResultObj )
+           Py_DECREF( ResultObj ) ;
+        }
         break ;
       }
       default : {
@@ -468,7 +432,6 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
     if ( Result == NULL ) {
       cdebug_out << "GraphExecutor::InNode::PyDynInvoke Node " << Name() << " " << method << " Error Result == NULL"
                  << endl ;
-      PyErr_Print();
       RetVal = false ;
     }
     else {
@@ -618,8 +581,11 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
           else {
             f = PyFloat_AsDouble( ArgValue ) ;
          }
+#ifdef REDHAT // mkr : debug for PAL12255
+          data <<= f ;
+#else
          data.replace(CORBA::TypeCode::PR_float_tc(), (void*)(&f));
-          //data <<= f ;
+#endif
 #if PyDynInvokeTrace
           cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << f << " (float)"
                  << " Result->ob_refcnt" << Result->ob_refcnt << " ArgValue->ob_refcnt"
@@ -643,8 +609,11 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
           else {
             d = PyFloat_AsDouble( ArgValue ) ;
          }
+#ifdef REDHAT // mkr : debug for PAL12255
+          data <<= d ;
+#else
          data.replace(CORBA::TypeCode::PR_double_tc(), (void*)(&d));
-          //data <<= d ;
+#endif
 #if PyDynInvokeTrace
           cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << d << " (double)"
                  << " Result->ob_refcnt" << Result->ob_refcnt << " ArgValue->ob_refcnt"
@@ -654,7 +623,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
         }
         case CORBA::tk_objref : {
           PyObject * ObjIor ;
-          //MyPyObjIorList = PyTuple_New( 1 ) ;
+          MyPyObjIorList = PyTuple_New( 1 ) ;
           if ( PyTuple_Check( Result ) ) {
             ObjIor = PyTuple_GetItem( Result , i ) ;
          }
@@ -666,22 +635,21 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
                  << " Result->ob_refcnt" << Result->ob_refcnt << " ObjIor->ob_refcnt"
                  << ObjIor->ob_refcnt << endl ;
 #endif
-          //Py_INCREF( ObjIor ) ;
+          Py_INCREF( ObjIor ) ;
 //          PyObject_Print( ObjIor , stdout , 0 ) ;
-          //PyTuple_SetItem( MyPyObjIorList , 0 , ObjIor ) ;
+          PyTuple_SetItem( MyPyObjIorList , 0 , ObjIor ) ;
 //          ResultIor = PyEval_CallObject( MyPyObjIor , MyPyObjIorList ) ;
-          //ResultIor = PyEvalCallObject( "PyObjIor" , MyPyObjIor , MyPyObjIorList ) ;
-         ResultIor = PyObject_CallFunction( MyPyObjIor , "O",ObjIor ) ;
+          ResultIor = PyEvalCallObject( "PyObjIor" , MyPyObjIor , MyPyObjIorList ) ;
 #if PyDynInvokeTrace
           cdebug << "ObjIor->ob_refcnt " << ObjIor->ob_refcnt-1 << endl ;
 #endif
-          //Py_DECREF( ObjIor ) ;
+          Py_DECREF( ObjIor ) ;
 #if PyDynInvokeTrace
-          //cdebug << "MyPyObjIorList->ob_refcnt " << MyPyObjIorList->ob_refcnt-1 << endl ;
+          cdebug << "MyPyObjIorList->ob_refcnt " << MyPyObjIorList->ob_refcnt-1 << endl ;
 #endif
-          //Py_DECREF( MyPyObjIorList ) ;
+          Py_DECREF( MyPyObjIorList ) ;
 #if PyDynInvokeTrace
-          //cdebug << "MyPyObjIor->ob_refcnt " << MyPyObjIor->ob_refcnt << endl ;
+          cdebug << "MyPyObjIor->ob_refcnt " << MyPyObjIor->ob_refcnt << endl ;
 #endif
           if ( ResultIor ) {
             char * IOR = NULL ;
@@ -748,8 +716,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
            }
          }
           else {
-            PyErr_Print();
-           cdebug_out << "GraphExecutor::InNode::PyDynInvoke Error ResultIor == NULL Node "
+            cdebug_out << "GraphExecutor::InNode::PyDynInvoke Error ResultIor == NULL Node "
                        << Name() << " method " << method << " " << endl ;
             RetVal = false ;
          }
@@ -816,9 +783,6 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod ,
     Py_DECREF( ArgsList ) ;
   }
 
-  fflush(stdout);
-  fflush(stderr);
-
 #if 0
   {
     int i ;
index ec591a8103e00e087aee8d115d2f172227f07b17..e0486d6e8ef765e75923007c8cba991e6f914eba 100644 (file)
@@ -1,22 +1,3 @@
-#  Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-#  This library is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU Lesser General Public
-#  License as published by the Free Software Foundation; either
-#  version 2.1 of the License.
-#
-#  This library is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#  Lesser General Public License for more details.
-#
-#  You should have received a copy of the GNU Lesser General Public
-#  License along with this library; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-#
-#  See http://www.salome-platform.org/
-#
 #==============================================================================
 #  File      : Makefile.in
 #  Created   : aug 21 2001
@@ -69,6 +50,11 @@ CPPFLAGS+= $(PYTHON_INCLUDES) $(QT_MT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES)
        -I${KERNEL_ROOT_DIR}/include/salome
 CXXFLAGS+= -g -D__x86__ -D__linux__ -ftemplate-depth-42 -Wall \
        -I${KERNEL_ROOT_DIR}/include/salome
+
+ifeq ($(OS),REDHAT)
+       CXXFLAGS+= -DREDHAT
+endif
+
 LDFLAGS+= -export-dynamic -lSalomeNS -lSalomeLifeCycleCORBA -lSalomeSuperVisionBase -lSalomeSuperVisionEditor -lOpUtil -lSALOMELocalTrace\
        -lc $(QT_MT_LIBS) $(OGL_LIBS) \
        -L${KERNEL_ROOT_DIR}/lib/salome