Result of GetLocalImp methods is pointer. For 64-bits platforms it is 8 bytes. Use CORBA::LongLong to send 8 bytes.
\param thePID is a process ID of the caller
\param isLocal is set True if the Study is launched locally with the caller
*/
- long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
+ long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
/*!
\param thePID is a process ID of the caller
\param isLocal is set True if the StudyManager is launched locally with the caller
*/
- long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
+ long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
};
\param thePID is a process ID of the caller
\param isLocal is set True if the SObject is launched locally with the caller
*/
- long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
+ long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
};
\param thePID is a process ID of the caller
\param isLocal is set True if the GenericAttribute is launched locally with the caller
*/
- long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
+ long long GetLocalImpl(in string theHostname, in long thePID, out boolean isLocal);
};
long pid = (long)getpid();
#endif
- long addr = theGA->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+ CORBA::LongLong addr = theGA->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
if(_isLocal) {
_local_impl = ((SALOMEDSImpl_GenericAttribute*)(addr));
_corba_impl = SALOMEDS::GenericAttribute::_nil();
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================
-CORBA::Long SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+CORBA::LongLong SALOMEDS_GenericAttribute_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
{
#ifdef WIN32
long pid = (long)_getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
TDF_Attribute* local_impl = _impl.operator->();
- return ((long)local_impl);
+ return ((CORBA::LongLong)local_impl);
}
static SALOMEDS::GenericAttribute_ptr CreateAttribute(const Handle(TDF_Attribute)& theAttr, CORBA::ORB_ptr theOrb);
- virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
+ virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif
long pid = (long)getpid();
#endif
-#if SIZEOF_LONG == 4
- long addr =
-#else
- int addr =
-#endif
+ CORBA::LongLong addr = // mpv: fix for IPAL13534: for 64-bit platforms use 8-bytes long for pointer storage
theSObject->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
if(_isLocal) {
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================
-CORBA::Long SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+CORBA::LongLong SALOMEDS_SObject_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
{
#ifdef WIN32
long pid = (long)_getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
SALOMEDSImpl_SObject* local_impl = _impl.operator->();
- return ((long)local_impl);
+ return ((CORBA::LongLong)local_impl);
}
virtual CORBA::Short Tag();
virtual CORBA::Short Depth();
- virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
+ virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif
long pid = (long)getpid();
#endif
-#if SIZEOF_LONG == 4
- long addr =
-#else
- int addr =
-#endif
+ CORBA::LongLong addr = // mpv: fix for IPAL13534: for 64 bit platform use 8-bytes long for pointer storage
theStudy->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
if(_isLocal) {
long pid = (long)getpid();
#endif
- long addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+ CORBA::LongLong addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
if(_isLocal) {
_local_impl = ((SALOMEDSImpl_StudyManager*)(addr));
_corba_impl = SALOMEDS::StudyManager::_duplicate(theManager);
long pid = (long)getpid();
#endif
- long addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
+ CORBA::LongLong addr = theManager->GetLocalImpl(GetHostname().c_str(), pid, _isLocal);
if(_isLocal) {
_local_impl = ((SALOMEDSImpl_StudyManager*)(addr));
_corba_impl = SALOMEDS::StudyManager::_duplicate(theManager);
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================
-CORBA::Long SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+CORBA::LongLong SALOMEDS_StudyManager_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
{
#ifdef WIN32
long pid = (long)_getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
SALOMEDSImpl_StudyManager* aManager = _impl.operator->();
- return ((long)aManager);
+ return ((CORBA::LongLong)aManager);
}
//===========================================================================
void ping(){};
- virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
+ virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
static PortableServer::POA_ptr GetPOA(const SALOMEDS::Study_ptr theStudy);
};
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================
-CORBA::Long SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
+CORBA::LongLong SALOMEDS_Study_i::GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal)
{
#ifdef WIN32
long pid = (long)_getpid();
#endif
isLocal = (strcmp(theHostname, GetHostname().c_str()) == 0 && pid == thePID)?1:0;
SALOMEDSImpl_Study* local_impl = _impl.operator->();
- return ((long)local_impl);
+ return ((CORBA::LongLong)local_impl);
}
virtual Handle(SALOMEDSImpl_Study) GetImpl() { return _impl; }
- virtual CORBA::Long GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
+ virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
};
#endif