Procházet zdrojové kódy

Merge pull request #11393 from ghalliday/issue20053

HPCC-20053 Ensure the return type for lookupBlob is consistent

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman před 6 roky
rodič
revize
dd6abacfb3

+ 2 - 2
common/remote/sockfile.cpp

@@ -4021,7 +4021,7 @@ public:
     {
     {
         throwUnexpected();
         throwUnexpected();
     }
     }
-    virtual byte * lookupBlob(unsigned __int64 id) override
+    virtual const byte * lookupBlob(unsigned __int64 id) override
     {
     {
         throwUnexpected();
         throwUnexpected();
     }
     }
@@ -4218,7 +4218,7 @@ public:
     {
     {
         return makeLocalFposOffset(partNum, prefetchBuffer.tell());
         return makeLocalFposOffset(partNum, prefetchBuffer.tell());
     }
     }
-    virtual byte * lookupBlob(unsigned __int64 id) override
+    virtual const byte * lookupBlob(unsigned __int64 id) override
     {
     {
         throwUnexpected();
         throwUnexpected();
     }
     }

+ 1 - 1
ecl/hthor/hthorkey.cpp

@@ -102,7 +102,7 @@ public:
     IMPLEMENT_IINTERFACE_O
     IMPLEMENT_IINTERFACE_O
 
 
 //IThorIndexCallback
 //IThorIndexCallback
-    virtual byte * lookupBlob(unsigned __int64 id) override
+    virtual const byte * lookupBlob(unsigned __int64 id) override
     { 
     { 
         size32_t dummy; 
         size32_t dummy; 
         return (byte *) keyManager->loadBlob(id, dummy); 
         return (byte *) keyManager->loadBlob(id, dummy); 

+ 1 - 1
roxie/ccd/ccdserver.hpp

@@ -284,7 +284,7 @@ public:
     IMPLEMENT_IINTERFACE_O
     IMPLEMENT_IINTERFACE_O
 
 
 //IThorIndexCallback
 //IThorIndexCallback
-    virtual byte * lookupBlob(unsigned __int64 id) override
+    virtual const byte * lookupBlob(unsigned __int64 id) override
     { 
     { 
         size32_t dummy; 
         size32_t dummy; 
         cleanupRequired = true;
         cleanupRequired = true;

+ 1 - 1
rtl/eclrtl/rtlkey.hpp

@@ -103,7 +103,7 @@ public:
 
 
 interface IBlobProvider
 interface IBlobProvider
 {
 {
-    virtual byte * lookupBlob(unsigned __int64 id) = 0;         // return reference, not freed by code generator, can dispose once transform() has returned.
+    virtual const byte * lookupBlob(unsigned __int64 id) = 0;         // return reference, not freed by code generator, can dispose once transform() has returned.
 };
 };
 
 
 interface IBlobCreator
 interface IBlobCreator

+ 1 - 1
rtl/include/eclhelper.hpp

@@ -2308,7 +2308,7 @@ interface IThorDiskCallback : extends IFilePositionProvider
 
 
 interface IThorIndexCallback : extends IInterface
 interface IThorIndexCallback : extends IInterface
 {
 {
-    virtual byte * lookupBlob(unsigned __int64 id) = 0;         // return reference, not freed by code generator, can dispose once transform() has returned.
+    virtual const byte * lookupBlob(unsigned __int64 id) = 0;         // return reference, not freed by code generator, can dispose once transform() has returned.
 };
 };
 
 
 enum
 enum

+ 1 - 1
system/jhtree/jhtree.hpp

@@ -302,7 +302,7 @@ public:
         if (klManager)
         if (klManager)
             klManager->releaseBlobs(); 
             klManager->releaseBlobs(); 
     }
     }
-    virtual byte * lookupBlob(unsigned __int64 id) { size32_t dummy; return (byte *) klManager->loadBlob(id, dummy); }
+    virtual const byte * lookupBlob(unsigned __int64 id) { size32_t dummy; return klManager->loadBlob(id, dummy); }
 };
 };
 
 
 extern jhtree_decl bool isCompressedIndex(const char *filename);
 extern jhtree_decl bool isCompressedIndex(const char *filename);

+ 1 - 1
thorlcr/activities/indexread/thindexreadslave.cpp

@@ -81,7 +81,7 @@ protected:
         IMPLEMENT_IINTERFACE_O_USING(CSimpleInterface)
         IMPLEMENT_IINTERFACE_O_USING(CSimpleInterface)
 
 
     //IThorIndexCallback
     //IThorIndexCallback
-        virtual byte *lookupBlob(unsigned __int64 id) override
+        virtual const byte *lookupBlob(unsigned __int64 id) override
         { 
         { 
             size32_t dummy;
             size32_t dummy;
             if (!keyManager)
             if (!keyManager)