]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[EDF26936] : 64bits integer to specify range + remote destruction of SALOME::SenderBy...
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 10 Feb 2023 16:25:23 +0000 (17:25 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 10 Feb 2023 16:25:23 +0000 (17:25 +0100)
idl/SALOME_Comm.idl
src/Communication/ReceiverFactory.cxx
src/Communication/ReceiverFactory.hxx
src/Container/SALOME_PyNode.py

index 911629531057253aabbd0e8be5f05ab42b401b3c..ee4c953413d5d255c87b88dca15a6f67cce06062 100644 (file)
@@ -23,6 +23,7 @@
 #ifndef _SALOME_COMM_IDL_
 #define _SALOME_COMM_IDL_
 
+#include "SALOME_GenericObj.idl"
 #include "SALOME_Exception.idl"
 
 /*!
@@ -135,10 +136,10 @@ module SALOME {
     void release();
   };
 
-  interface SenderByte
+  interface SenderByte : GenericObj
   {
-    unsigned long getSize();
-    vectorOfByte sendPart(in unsigned long n1,in unsigned long n2);
+    unsigned long long getSize();
+    vectorOfByte sendPart(in unsigned long long n1,in unsigned long long n2);
   };
 };
 
index 44ff3a0cdb10d5de8add8f9091aac4ff127dcf61..13cf127cd3c90a06aee8ca432ed4db104be0aa6e 100644 (file)
@@ -226,3 +226,7 @@ void SeqByteReceiver::fetchByChunks(unsigned long size)
   }
 }
 
+SeqByteReceiver::~SeqByteReceiver()
+{
+  _obj->UnRegister();
+}
index 3d61b262ff75da9bf695391c14e12cc18d0b0b37..c566ea9d057dc7fd3fda5522778a599435a7eee8 100644 (file)
@@ -50,6 +50,7 @@ class COMMUNICATION_EXPORT SeqByteReceiver
 public:
   SeqByteReceiver(SALOME::SenderByte_ptr sender);
   char *data(unsigned long& size);
+  ~SeqByteReceiver();
 private:
   void fetchOneShot(unsigned long size);
   void fetchByChunks(unsigned long size);
index 1a0b3eb0b7e0f56bdabbd7f73330a0db1122aa08..abe0823769403fd1854a36df4a8aaa39e39fbf44 100644 (file)
@@ -103,8 +103,9 @@ class PyNode_i (Engines__POA.PyNode,Generic):
       l=traceback.format_exception(exc_typ,exc_val,exc_fr)
       raise SALOME.SALOME_Exception(SALOME.ExceptionStruct(SALOME.BAD_PARAM,"".join(l),"PyNode: %s, function: %s" % (self.nodeName,funcName),0))
 
-class SenderByte_i(SALOME__POA.SenderByte):
-  def __init__(self,bytesToSend):
+class SenderByte_i(SALOME__POA.SenderByte,Generic):
+  def __init__(self,poa,bytesToSend):
+    Generic.__init__(self,poa)
     self.bytesToSend = bytesToSend
 
   def getSize(self):
@@ -193,7 +194,7 @@ class PyScriptNode_i (Engines__POA.PyScriptNode,Generic):
           raise KeyError("There is no variable %s in context" % arg)
         argsout.append(self.context[arg])
       argsout=pickle.dumps(tuple(argsout),-1)
-      ret = SenderByte_i( argsout )
+      ret = SenderByte_i( self.poa,argsout )
       id_o = self.poa.activate_object(ret)
       retObj = self.poa.id_to_reference(id_o)
       return retObj._narrow( SALOME.SenderByte )