From 051c8b3cf68362a1637558dcddd77622be473095 Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 9 Aug 2006 07:35:03 +0000 Subject: [PATCH] PAL13137: Some modifications to work on 64 bits architectures. A patch by Erwan ADAM. --- src/GraphBase/DataFlowBase_Base.cxx | 2 +- src/GraphBase/DataFlowBase_DataPort.cxx | 48 +++++++------ src/GraphBase/DataFlowBase_Graph.cxx | 16 ++--- src/GraphBase/DataFlowBase_XmlHandler.cxx | 13 ++-- src/GraphEditor/DataFlowEditor_OutNode.cxx | 6 +- .../DataFlowExecutor_DynInvoke.cxx | 8 +-- src/GraphExecutor/DataFlowExecutor_InNode.cxx | 4 +- .../DataFlowExecutor_InNodeThreads.cxx | 71 ++++++++++--------- .../DataFlowExecutor_PyDynInvoke.cxx | 20 +++--- src/Supervision/Value_Impl.cxx | 4 +- 10 files changed, 98 insertions(+), 94 deletions(-) diff --git a/src/GraphBase/DataFlowBase_Base.cxx b/src/GraphBase/DataFlowBase_Base.cxx index dc00155..12ca867 100644 --- a/src/GraphBase/DataFlowBase_Base.cxx +++ b/src/GraphBase/DataFlowBase_Base.cxx @@ -97,7 +97,7 @@ ostream & GraphBase::Base::AnyValue( const CORBA::Any & anAny ) { break; } case CORBA::tk_long: { - long l; + CORBA::Long l; anAny >>= l; *_fdebug << " " << l << "(tk_long)" << endl ; break; diff --git a/src/GraphBase/DataFlowBase_DataPort.cxx b/src/GraphBase/DataFlowBase_DataPort.cxx index ae0f79f..f8b92c2 100644 --- a/src/GraphBase/DataFlowBase_DataPort.cxx +++ b/src/GraphBase/DataFlowBase_DataPort.cxx @@ -71,23 +71,23 @@ void GraphBase::DataPort::InitialValues(CORBA::Any aValue ) { } else if ( !strcmp( Type , "boolean" ) ) { cdebug << "boolean" << endl ; - InitialValue <<= (long ) 0 ; + InitialValue <<= (CORBA::Long ) 0 ; } else if ( !strcmp( Type , "char" ) ) { cdebug << "char" << endl ; - InitialValue <<= (long ) 0 ; + InitialValue <<= (CORBA::Long ) 0 ; } else if ( !strcmp( Type , "short" ) ) { cdebug << "short" << endl ; - InitialValue <<= (long ) 0 ; + InitialValue <<= (CORBA::Long ) 0 ; } else if ( !strcmp( Type , "int" ) ) { cdebug << "long" << endl ; - InitialValue <<= (long ) 0 ; + InitialValue <<= (CORBA::Long ) 0 ; } else if ( !strcmp( Type , "long" ) ) { cdebug << "long" << endl ; - InitialValue <<= (long ) 0 ; + InitialValue <<= (CORBA::Long ) 0 ; } else if ( !strcmp( Type , "float" ) ) { cdebug << "float" << endl ; @@ -115,7 +115,7 @@ void GraphBase::DataPort::InitialValues(CORBA::Any aValue ) { } // else { // cdebug << "InitialValues ERROR (other) " << Type << endl ; -// InitialValue <<= (long ) 0 ; +// InitialValue <<= (CORBA::Long ) 0 ; // } _InitialValue = new CORBA::Any( InitialValue ) ; _Value = &_InitialValue ; @@ -165,12 +165,13 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) { CORBA::Any * theValue = new CORBA::Any() ; if ( !strcmp( Type , "boolean" ) || !strcmp( Type , "char" ) || !strcmp( Type , "short" ) || !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { - long l ; - sscanf( t , "%ld" , &l ) ; + long ll ; + sscanf( t , "%ld" , &ll ) ; + CORBA::Long l = ll ; *theValue <<= l ; *theValue >>= l; #if ValueTrace - cdebug << " --> Value( " << l << ") (long) kind " << theValue->type()->kind() ; + cdebug << " --> Value( " << l << ") (CORBA::Long) kind " << theValue->type()->kind() ; #endif } else if ( !strcmp( Type , "float" ) || !strcmp( Type , "double" ) ) { @@ -216,11 +217,11 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) { } break; } - case CORBA::tk_long: { // Input long Value - long l; + case CORBA::tk_long: { // Input CORBA::Long Value + CORBA::Long l; *aDataValue >>= l; #if ValueTrace - cdebug << "Value( " << l << ") (long)"; + cdebug << "Value( " << l << ") (CORBA::Long)"; #endif if ( !strcmp( Type , "boolean" ) || !strcmp( Type , "char" ) || !strcmp( Type , "short" ) || !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { // SuperVision Value @@ -228,14 +229,15 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) { *_Value = aDataValue ; *_theValue >>= l; #if ValueTrace - cdebug << " == Value( " << l << ") (long)"; + cdebug << " == Value( " << l << ") (CORBA::Long)"; #endif } else { CORBA::Any * theValue = new CORBA::Any() ; if ( !strcmp( Type , "string" ) ) { + long ll = l; char t[40] ; - sprintf( t , "%ld" , l ) ; + sprintf( t , "%ld" , ll ) ; *theValue <<= t ; char *tt ; *theValue >>= tt ; @@ -313,11 +315,11 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) { } else if ( !strcmp( Type , "boolean" ) || !strcmp( Type , "char" ) || !strcmp( Type , "short" ) || !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { - long l = (long ) d ; + CORBA::Long l = (CORBA::Long ) d ; *theValue <<= l ; *theValue >>= l; #if ValueTrace - cdebug << " --> Value( " << l << ") (long) kind " << theValue->type()->kind() ; + cdebug << " --> Value( " << l << ") (CORBA::Long) kind " << theValue->type()->kind() ; #endif } else { // Default @@ -384,11 +386,11 @@ void GraphBase::DataPort::SetValue( const CORBA::Any * aDataValue ) { } else if ( !strcmp( Type , "boolean" ) || !strcmp( Type , "char" ) || !strcmp( Type , "short" ) || !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { - long l = (long ) obj ; + CORBA::Long l = (CORBA::Long ) obj ; *theValue <<= l ; *theValue >>= l; #if ValueTrace - cdebug << " --> Value( " << l << ") (long) kind " << theValue->type()->kind() ; + cdebug << " --> Value( " << l << ") (CORBA::Long) kind " << theValue->type()->kind() ; #endif } else if ( !strcmp( Type , "float" ) || !strcmp( Type , "double" ) ) { @@ -475,10 +477,10 @@ const CORBA::Any GraphBase::DataPort::Value() const { break; } case CORBA::tk_long: { - long l; + CORBA::Long l; //JR 30.03.2005 *theValue >>= l; theValue >>= l; -// cdebug << "GraphBase::DataPort::Value() : " << l << " (long) " << endl ; +// cdebug << "GraphBase::DataPort::Value() : " << l << " (CORBA::Long) " << endl ; break; } case CORBA::tk_objref: { @@ -533,7 +535,7 @@ bool GraphBase::DataPort::BoolValue() const { // cdebug << pthread_self() << " BoolValue() --> pthread_mutex_locked " << aMutexWait // << endl ; if ( (*_Value)->type()->kind() == CORBA::tk_long ) { - long val ; + CORBA::Long val ; **_Value >>= val ; if ( val ) { RetVal = true ; @@ -581,9 +583,9 @@ void GraphBase::DataPort::StringValue(ostream & f ) const { f << d << " (double)" ; break; case CORBA::tk_long: - long l; + CORBA::Long l; *theValue >>= l; - f << l << " (long)" ; + f << l << " (CORBA::Long)" ; break; case CORBA::tk_objref: CORBA::Object_ptr ObjRef ; diff --git a/src/GraphBase/DataFlowBase_Graph.cxx b/src/GraphBase/DataFlowBase_Graph.cxx index f364ab3..6943ba8 100644 --- a/src/GraphBase/DataFlowBase_Graph.cxx +++ b/src/GraphBase/DataFlowBase_Graph.cxx @@ -1103,10 +1103,10 @@ bool GraphBase::Graph::AddLink( const char* FromNodeName , CORBA::Any aValue ; //JR 29.09.2005 Debug for CEA : we do not do that for MacroNodes : if ( !fromNode->IsMacroNode() ) { - aValue <<= (long ) 1 ; + aValue <<= (CORBA::Long ) 1 ; } else { - aValue <<= (long ) 0 ; + aValue <<= (CORBA::Long ) 0 ; } fromPort->SetValue( aValue ) ; } @@ -1592,9 +1592,9 @@ bool GraphBase::Graph::AddInputData( const char* ToNodeName , cdebug << d << " (double) " ; break; case CORBA::tk_long: - long l; + CORBA::Long l; aValue >>= l; - cdebug << l << " (long) " ; + cdebug << l << " (CORBA::Long) " ; break; case CORBA::tk_objref: cdebug << "(object reference) " ; @@ -1679,9 +1679,9 @@ bool GraphBase::Graph::ChangeInputData( const char * ToNodeName , cdebug << d << " (double) " ; break; case CORBA::tk_long: - long l; + CORBA::Long l; aValue >>= l; - cdebug << l << " (long) " ; + cdebug << l << " (CORBA::Long) " ; break; case CORBA::tk_objref: cdebug << "(object reference) " ; @@ -1746,9 +1746,9 @@ bool GraphBase::Graph::AddInputData( const char* ToNodeName , cdebug << d << " (double) " ; break; case CORBA::tk_long: - long l; + CORBA::Long l; theValue >>= l; - cdebug << l << " (long) " ; + cdebug << l << " (CORBA::Long) " ; break; case CORBA::tk_objref: cdebug << "(object reference) " ; diff --git a/src/GraphBase/DataFlowBase_XmlHandler.cxx b/src/GraphBase/DataFlowBase_XmlHandler.cxx index 13d8095..6f32e98 100644 --- a/src/GraphBase/DataFlowBase_XmlHandler.cxx +++ b/src/GraphBase/DataFlowBase_XmlHandler.cxx @@ -739,11 +739,11 @@ bool GraphBase::XmlHandler::endElement( const QString&, break; } case CORBA::tk_long: { - aLink.aLinkValue <<= (long ) 0 ; - long l; + aLink.aLinkValue <<= (CORBA::Long ) 0 ; + CORBA::Long l; aLink.aLinkValue >>= l; #if TRACE - MESSAGE( l << " (long)" ); + MESSAGE( l << " (CORBA::Long)" ); #endif break; } @@ -801,11 +801,12 @@ bool GraphBase::XmlHandler::endElement( const QString&, break; } case CORBA::tk_long: { - long l; - sscanf( fieldvalue[depth].c_str() , "%ld" , &l ) ; + long ll; + sscanf( fieldvalue[depth].c_str() , "%ld" , &ll ) ; + CORBA::Long l = ll ; aLink.aLinkValue <<= l; #if TRACE - MESSAGE( l << " (long)" ); + MESSAGE( l << " (CORBA::Long)" ); #endif break; } diff --git a/src/GraphEditor/DataFlowEditor_OutNode.cxx b/src/GraphEditor/DataFlowEditor_OutNode.cxx index 00e9329..1a4e2e0 100644 --- a/src/GraphEditor/DataFlowEditor_OutNode.cxx +++ b/src/GraphEditor/DataFlowEditor_OutNode.cxx @@ -1230,7 +1230,7 @@ bool GraphEditor::OutNode::LinkSaveXML( QDomDocument & Graph , QDomElement & lin break ; } case CORBA::tk_long: { - long l; + CORBA::Long l; aLink.aLinkValue >>= l; // f << Tabs << " " << l << "" << endl ; QDomElement value = Graph.createElement( "value" ) ; @@ -1239,7 +1239,7 @@ bool GraphEditor::OutNode::LinkSaveXML( QDomDocument & Graph , QDomElement & lin aField = Graph.createTextNode( aKind ) ; datavalue.appendChild( value ) ; value.appendChild( aField ) ; -// MESSAGE( "ToString( long ) " << l ); +// MESSAGE( "ToString( CORBA::Long ) " << l ); break ; } case CORBA::tk_objref: { @@ -1348,7 +1348,7 @@ bool GraphEditor::OutNode::LinkSavePY( ostream &f , const char * aGraphName , break ; } case CORBA::tk_long: { - long l; + CORBA::Long l; aLink.aLinkValue >>= l; f << l ; break ; diff --git a/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx b/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx index 6580d65..157abdd 100644 --- a/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx +++ b/src/GraphExecutor/DataFlowExecutor_DynInvoke.cxx @@ -90,9 +90,9 @@ void GraphExecutor::InNode::DynInvoke(Engines::Component_ptr objComponent , break ; } case CORBA::tk_long : { - long l ; + CORBA::Long l ; data >>= l ; - cdebug << "ArgIn" << i << " : " << ArgName << " Value " << l << " (long)" << endl ; + cdebug << "ArgIn" << i << " : " << ArgName << " Value " << l << " (CORBA::Long)" << endl ; break ; } case CORBA::tk_float : { @@ -159,9 +159,9 @@ void GraphExecutor::InNode::DynInvoke(Engines::Component_ptr objComponent , break ; } case CORBA::tk_long : { - long l ; + CORBA::Long l ; data >>= l ; - cdebug << "ArgOut" << i << " : " << ArgName << " Value " << l << " (long)" << endl ; + cdebug << "ArgOut" << i << " : " << ArgName << " Value " << l << " (CORBA::Long)" << endl ; break ; } case CORBA::tk_float : { diff --git a/src/GraphExecutor/DataFlowExecutor_InNode.cxx b/src/GraphExecutor/DataFlowExecutor_InNode.cxx index e914e9c..ac74281 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNode.cxx +++ b/src/GraphExecutor/DataFlowExecutor_InNode.cxx @@ -1394,8 +1394,8 @@ void GraphExecutor::InNode::InitialState() anOutPort->PortDone( true ) ; //JR 21.02.2005 Debug Memory leak : CORBA::Any * anAny = new CORBA::Any() ; CORBA::Any anAny = CORBA::Any() ; -//JR 21.02.2005 Debug Memory leak : *anAny <<= (long ) 1 ; - anAny <<= (long ) 1 ; +//JR 21.02.2005 Debug Memory leak : *anAny <<= (CORBA::Long ) 1 ; + anAny <<= (CORBA::Long ) 1 ; anOutPort->SetValue( anAny ) ; _InitLoop = true ; cdebug << "InPort" << i << " " << anInPort->PortName() << " " << anInPort->PortStatus() diff --git a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx index 980aa50..bf64f35 100644 --- a/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx +++ b/src/GraphExecutor/DataFlowExecutor_InNodeThreads.cxx @@ -1101,8 +1101,8 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() { InReady += 1 ; //JR 21.02.2005 Debug Memory leak : CORBA::Any * anAny = new CORBA::Any() ; CORBA::Any anAny = CORBA::Any() ; -//JR 21.02.2005 Debug Memory leak : *anAny <<= (long ) 1 ; - anAny <<= (long ) 1 ; +//JR 21.02.2005 Debug Memory leak : *anAny <<= (CORBA::Long ) 1 ; + anAny <<= (CORBA::Long ) 1 ; _OutNode->Graph()->GetGraphNode( anOutPort->NodeName() )->GetChangeNodeOutGate()->SetValue( anAny ) ; #if SomeDataReadyActionTrace cdebug << pthread_self() << "/" << ThreadNo() << " " << Name() << " " @@ -1134,7 +1134,7 @@ int GraphExecutor::InNode::DataWaiting_SomeDataReadyAction() { else if ( anInPort->IsGate() ) { //JR 30.03.2005 const CORBA::Any * theValue = anOutPort->Value() ; const CORBA::Any theValue = anOutPort->Value() ; - long GateOpened ; + CORBA::Long GateOpened ; //JR 30.03.2005 (*theValue) >>= GateOpened ; theValue >>= GateOpened ; if ( GateOpened != 0 ) { @@ -1780,7 +1780,7 @@ int GraphExecutor::InNode::DataReady_ExecuteAction() { //JR 29.09.2005 Debug for CEA (examples/GraphMacroNodes1) : // Set of value of the OutGate of the corresponding MacroNode was missing CORBA::Any anAny = CORBA::Any() ; - anAny <<= (long ) 1 ; + anAny <<= (CORBA::Long ) 1 ; GraphMacroNode()->GraphEditor()->Executor()->OutputOfAny( Name() , "Gate" , anAny ) ; #if TraceDataReady_ExecuteAction cdebug << "DataReady_ExecuteAction OutputOfAny( " << Name() << " , Gate , 1 )" << endl ; @@ -2332,9 +2332,9 @@ void GraphExecutor::InNode::SetWaitingStates(GraphExecutor::InNode * EndNode ) { if ( anOutPort ) { //JR 21.02.2005 Debug Memory leak : CORBA::Any * anAny = new CORBA::Any() ; CORBA::Any anAny = CORBA::Any() ; -// *anAny <<= (long ) 1 ; -//JR 21.02.2005 Debug Memory leak : *anAny <<= (long ) 0 ; - anAny <<= (long ) 0 ; +// *anAny <<= (CORBA::Long ) 1 ; +//JR 21.02.2005 Debug Memory leak : *anAny <<= (CORBA::Long ) 0 ; + anAny <<= (CORBA::Long ) 0 ; anOutPort->SetValue( anAny ) ; anInPort->PortState( SUPERV::WaitingState ) ; // delete anAny ; @@ -2507,8 +2507,8 @@ int GraphExecutor::InNode::Successed_SuccessAction() { if ( anOutPort ) { //JR 21.02.2005 Debug Memory leak : CORBA::Any * anAny = new CORBA::Any() ; CORBA::Any anAny = CORBA::Any() ; -//JR 21.02.2005 Debug Memory leak : *anAny <<= (long ) 1 ; - anAny <<= (long ) 1 ; +//JR 21.02.2005 Debug Memory leak : *anAny <<= (CORBA::Long ) 1 ; + anAny <<= (CORBA::Long ) 1 ; anOutPort->SetValue( anAny ) ; aLabelNode->GetChangeNodeInGate()->PortState( SUPERV::ReadyState ) ; // delete anAny ; @@ -2698,8 +2698,8 @@ int GraphExecutor::InNode::Successed_SuccessAction() { LoopOutPort->PortDone( true ) ; //JR 21.02.2005 Debug Memory leak : CORBA::Any * anAny = new CORBA::Any() ; // InitLoop CORBA::Any anAny = CORBA::Any() ; // InitLoop -//JR 21.02.2005 Debug Memory leak : *anAny <<= (long ) 1 ; - anAny <<= (long ) 1 ; +//JR 21.02.2005 Debug Memory leak : *anAny <<= (CORBA::Long ) 1 ; + anAny <<= (CORBA::Long ) 1 ; LoopOutPort->SetValue( anAny ) ; int j ; for ( j = 0 ; j < toNode->GetNodeInPortsSize() ; j++ ) { @@ -3193,8 +3193,8 @@ void GraphExecutor::InNode::InParametersSet( bool & Err , if ( anInPort->IsGate() ) { //JR 21.02.2005 Debug Memory leak : CORBA::Any * anAny = new CORBA::Any() ; CORBA::Any anAny = CORBA::Any() ; -//JR 21.02.2005 Debug Memory leak : *anAny <<= (long ) 0 ; - anAny <<= (long ) 0 ; +//JR 21.02.2005 Debug Memory leak : *anAny <<= (CORBA::Long ) 0 ; + anAny <<= (CORBA::Long ) 0 ; theOutPort->SetValue( anAny ) ; // delete anAny ; } @@ -3257,11 +3257,12 @@ void GraphExecutor::InNode::InParametersSet( bool & Err , // theOutPort->Value( D.Value ) ; } else if ( !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { - long l ; - sscanf( t , "%ld" , &l ) ; + long ll ; + sscanf( t , "%ld" , &ll ) ; + CORBA::Long l = ll ; D.Value <<= l ; #if InParametersSetTrace - cdebug << "string '" << t << " --> long " << l ; + cdebug << "string '" << t << " --> CORBA::Long " << l ; #endif // theOutPort->Value( D.Value ) ; } @@ -3320,14 +3321,14 @@ void GraphExecutor::InNode::InParametersSet( bool & Err , theOutPort->StringValue( *GraphBase::Base::_fdebug ) ; cdebug << endl ; #endif - long l; + CORBA::Long l; D.Value >>= l; #if InParametersSetTrace - cdebug << l << " (long)" << endl ; + cdebug << l << " (CORBA::Long)" << endl ; #endif if ( !strcmp( Type , "string" ) ) { char t[40] ; - sprintf( t , "%ld" , l ) ; + sprintf( t , "%ld" , (long)l ) ; D.Value <<= t ; // theOutPort->Value( D.Value ) ; } @@ -3414,8 +3415,8 @@ void GraphExecutor::InNode::InParametersSet( bool & Err , // theOutPort->Value( D.Value ) ; } else if ( !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { - long l ; - l = (long ) d ; + CORBA::Long l ; + l = (CORBA::Long ) d ; D.Value <<= l ; // theOutPort->Value( D.Value ) ; } @@ -3480,7 +3481,7 @@ void GraphExecutor::InNode::InParametersSet( bool & Err , // theOutPort->Value( D.Value ) ; } else if ( !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { - long l = 0 ; + CORBA::Long l = 0 ; D.Value <<= l ; // theOutPort->Value( D.Value ) ; } @@ -3583,7 +3584,7 @@ void GraphExecutor::InNode::InOutParametersSet( int nOutParams , D.Value <<= s ; } else if ( !strcmp( Type , "int" ) || !strcmp( Type , "long" ) ) { - D.Value <<= (long ) 0 ; + D.Value <<= (CORBA::Long ) 0 ; } else if ( !strcmp( Type , "float" ) ) { float f = 0 ; @@ -3627,9 +3628,9 @@ void GraphExecutor::InNode::InOutParametersSet( int nOutParams , cdebug << ThreadNo() << " " << s << "(short)" << endl ; break; case CORBA::tk_long: - long l; + CORBA::Long l; D.Value >>= l; - cdebug << ThreadNo() << " " << l << "(long)" << endl ; + cdebug << ThreadNo() << " " << l << "(CORBA::Long)" << endl ; break; case CORBA::tk_float: float f; @@ -3706,7 +3707,7 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , case CORBA::tk_boolean: { bool b ; D.Value >>= (CORBA::Any::to_boolean ) b; - long l = (long ) b ; + CORBA::Long l = (CORBA::Long ) b ; D.Value <<= l ; #if OutParametersSetTrace cdebug << ThreadNo() << " " << b << "(boolean)" << endl ; @@ -3716,7 +3717,7 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , case CORBA::tk_char: { unsigned char c ; D.Value >>= (CORBA::Any::to_char ) c; - long l = (long ) c ; + CORBA::Long l = (CORBA::Long ) c ; D.Value <<= l ; #if OutParametersSetTrace cdebug << ThreadNo() << " " << c << "(char)" << endl ; @@ -3726,7 +3727,7 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , case CORBA::tk_short: { short s; D.Value >>= s; - long l = (long ) s ; + CORBA::Long l = (CORBA::Long ) s ; D.Value <<= l ; #if OutParametersSetTrace cdebug << ThreadNo() << " " << s << "(short)" << endl ; @@ -3734,10 +3735,10 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , break; } case CORBA::tk_long: { - long l; + CORBA::Long l; D.Value >>= l; #if OutParametersSetTrace - cdebug << ThreadNo() << " " << l << "(long)" << endl ; + cdebug << ThreadNo() << " " << l << "(CORBA::Long)" << endl ; #endif break; } @@ -3795,7 +3796,7 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , #if OutParametersSetTrace cdebug << " Gate " ; #endif - long l = 1; + CORBA::Long l = 1; OutParametersList[i].Value <<= l; anOutPort->SetValue( OutParametersList[i].Value ); } @@ -3946,9 +3947,9 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , cdebug << ThreadNo() << " Out" << i << " : " << s << "(short)" << endl ; break; case CORBA::tk_long: - long l; + CORBA::Long l; (anOutPort->Value()) >>= l; - cdebug << ThreadNo() << " Out" << i << " : " << l << "(long)" << endl ; + cdebug << ThreadNo() << " Out" << i << " : " << l << "(CORBA::Long)" << endl ; break; case CORBA::tk_float: float f; @@ -4010,7 +4011,7 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , << aGateOutPort->PortName() << " " << aGateOutPort->Kind() << " WITH DefaultPort" << endl ; #endif - long l = 1; + CORBA::Long l = 1; OutParametersList[0].Value <<= l ; aGateOutPort->SetValue( OutParametersList[0].Value ) ; } @@ -4037,7 +4038,7 @@ bool GraphExecutor::InNode::OutParametersSet( bool Err , << aGateOutPort->PortName() << " " << aGateOutPort->Kind() << " NO DefaultPort" << " OrSwitch " << OrSwitch << " DefaultSwitch " << DefaultSwitch << endl ; #endif - long l = 0; + CORBA::Long l = 0; OutParametersList[0].Value <<= l ; aGateOutPort->SetValue( OutParametersList[0].Value ) ; } diff --git a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx index fd0acdc..8781b6e 100644 --- a/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx +++ b/src/GraphExecutor/DataFlowExecutor_PyDynInvoke.cxx @@ -368,7 +368,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , break ; } case CORBA::tk_long : { - long l ; + CORBA::Long l ; data >>= l ; PyObject * ArgValue = Py_BuildValue( "l" , l ) ; #if PyDynInvokeTrace @@ -378,7 +378,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , PyTuple_SetItem( ArgsList , i , ArgValue ) ; #if PyDynInvokeTrace cdebug << "ArgIn" << i << " : " << sname << " " << method << " Value " << l - << " (long) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" + << " (CORBA::Long) ArgsList->ob_refcnt" << ArgsList->ob_refcnt << " ArgValue->ob_refcnt" << ArgValue->ob_refcnt << endl ; #endif break ; @@ -593,7 +593,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , break ; } case CORBA::tk_long : { - long l = 0 ; + CORBA::Long l = 0 ; PyObject * ArgValue ; if ( PyTuple_Check( Result ) ) { ArgValue = PyTuple_GetItem( Result , i ) ; @@ -614,7 +614,7 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , data <<= l ; #if PyDynInvokeTrace if ( ArgValue ) - cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << l << " (long)" + cdebug << "ArgOut" << i << " : " << sname << " " << method << " Value " << l << " (CORBA::Long)" << " Result->ob_refcnt" << Result->ob_refcnt << " ArgValue->ob_refcnt" << ArgValue->ob_refcnt << endl ; #endif @@ -633,13 +633,13 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , if ( !PyFloat_Check( ArgValue ) ) { // mkr : bug PAL12454 if ( PyLong_Check( ArgValue ) ) { - cdebug << "ArgOut" << i << " : " << sname << " " << method << " OK (long)" << endl ; - long l = PyLong_AsLong( ArgValue ); + cdebug << "ArgOut" << i << " : " << sname << " " << method << " OK (CORBA::Long)" << endl ; + CORBA::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 ); + CORBA::Long l = PyInt_AsLong( ArgValue ); f = (float) l; } else { @@ -681,13 +681,13 @@ bool GraphExecutor::InNode::PyDynInvoke( PyObject * MyPyRunMethod , if ( !PyFloat_Check( ArgValue ) ) { // mkr : bug PAL12454 if ( PyLong_Check( ArgValue ) ) { - cdebug << "ArgOut" << i << " : " << sname << " " << method << " OK (long)" << endl ; - long l = PyLong_AsLong( ArgValue ); + cdebug << "ArgOut" << i << " : " << sname << " " << method << " OK (CORBA::Long)" << endl ; + CORBA::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 ); + CORBA::Long l = PyInt_AsLong( ArgValue ); d = (double) l; } else { diff --git a/src/Supervision/Value_Impl.cxx b/src/Supervision/Value_Impl.cxx index 54be215..162c932 100644 --- a/src/Supervision/Value_Impl.cxx +++ b/src/Supervision/Value_Impl.cxx @@ -273,11 +273,11 @@ char * Value_Impl::ToString() { break ; } case CORBA::tk_long: { - long l; + CORBA::Long l; anAny >>= l; astr << l << ends ; retstr = astr.str().c_str() ; -// MESSAGE( "ToString( long ) '" << l << " " << retstr << "'" ); +// MESSAGE( "ToString( CORBA::Long ) '" << l << " " << retstr << "'" ); break ; } case CORBA::tk_double: { -- 2.39.2