This is an automated email from the ASF dual-hosted git repository.

zclll pushed a commit to branch clucene
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git


The following commit(s) were added to refs/heads/clucene by this push:
     new 337e7989c21 [fix]add a new lucene::util::Deletor::cacArray for Doris 
(#357)
337e7989c21 is described below

commit 337e7989c211d337398764980dc2a01832debae5
Author: admiring_xm <[email protected]>
AuthorDate: Sat Sep 13 18:07:00 2025 +0800

    [fix]add a new lucene::util::Deletor::cacArray for Doris (#357)
---
 src/core/CLucene/util/Equators.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/core/CLucene/util/Equators.h b/src/core/CLucene/util/Equators.h
index ef76ba84546..6166c9c035d 100644
--- a/src/core/CLucene/util/Equators.h
+++ b/src/core/CLucene/util/Equators.h
@@ -216,6 +216,18 @@ public:
                        _CLDELETE_CaARRAY(arr);
                }
        };
+
+       // When using this class, we must ensure that the key is obtained via 
strdup or allocated using malloc
+       class CLUCENE_INLINE_EXPORT cacArray: public AbstractDeletor{
+       public:
+               void Delete(void* arr){
+                       doDelete((const char*)arr);
+               }
+               static void doDelete(const char* arr){
+                       auto temp = const_cast<char*>(arr);
+                       _CLDELETE_CaARRAY(temp);
+               }
+       };
        
        template<typename _kt>
        class CLUCENE_INLINE_EXPORT Object: public AbstractDeletor{


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to