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

apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new f3786ff  ARROW-6190: [C++] Define and declare functions regardless of 
NDEBUG
f3786ff is described below

commit f3786ffcb7fc5410ced0190593df5c96be272240
Author: Omer Ozarslan <[email protected]>
AuthorDate: Mon Aug 12 13:45:44 2019 +0200

    ARROW-6190: [C++] Define and declare functions regardless of NDEBUG
    
    Closes #5049 from ozars/cpp-ndebug-linking-issue and squashes the following 
commits:
    
    f4e371e84 <Omer Ozarslan> Remove NDEBUG ifdefs around CheckUTF8Initialized 
to avoid linker errors
    aca7e1cbb <Omer Ozarslan> Remove NDEBUG ifdefs around CheckValueSize to 
avoid linker errors
    
    Authored-by: Omer Ozarslan <[email protected]>
    Signed-off-by: Antoine Pitrou <[email protected]>
---
 cpp/src/arrow/array/builder_binary.cc | 2 --
 cpp/src/arrow/array/builder_binary.h  | 2 --
 cpp/src/arrow/util/utf8.cc            | 2 --
 cpp/src/arrow/util/utf8.h             | 2 --
 4 files changed, 8 deletions(-)

diff --git a/cpp/src/arrow/array/builder_binary.cc 
b/cpp/src/arrow/array/builder_binary.cc
index 9a4ad74..be1755a 100644
--- a/cpp/src/arrow/array/builder_binary.cc
+++ b/cpp/src/arrow/array/builder_binary.cc
@@ -62,11 +62,9 @@ FixedSizeBinaryBuilder::FixedSizeBinaryBuilder(const 
std::shared_ptr<DataType>&
       byte_width_(checked_cast<const 
FixedSizeBinaryType&>(*type).byte_width()),
       byte_builder_(pool) {}
 
-#ifndef NDEBUG
 void FixedSizeBinaryBuilder::CheckValueSize(int64_t size) {
   DCHECK_EQ(size, byte_width_) << "Appending wrong size to 
FixedSizeBinaryBuilder";
 }
-#endif
 
 Status FixedSizeBinaryBuilder::AppendValues(const uint8_t* data, int64_t 
length,
                                             const uint8_t* valid_bytes) {
diff --git a/cpp/src/arrow/array/builder_binary.h 
b/cpp/src/arrow/array/builder_binary.h
index 8941280..5c53c1c 100644
--- a/cpp/src/arrow/array/builder_binary.h
+++ b/cpp/src/arrow/array/builder_binary.h
@@ -496,9 +496,7 @@ class ARROW_EXPORT FixedSizeBinaryBuilder : public 
ArrayBuilder {
     return data_ptr + i * byte_width_;
   }
 
-#ifndef NDEBUG
   void CheckValueSize(int64_t size);
-#endif
 };
 
 // ----------------------------------------------------------------------
diff --git a/cpp/src/arrow/util/utf8.cc b/cpp/src/arrow/util/utf8.cc
index 9ba481f..28e6d24 100644
--- a/cpp/src/arrow/util/utf8.cc
+++ b/cpp/src/arrow/util/utf8.cc
@@ -69,12 +69,10 @@ static void InitializeLargeTable() {
   }
 }
 
-#ifndef NDEBUG
 ARROW_EXPORT void CheckUTF8Initialized() {
   DCHECK_EQ(utf8_large_table[0], 0)
       << "InitializeUTF8() must be called before calling UTF8 routines";
 }
-#endif
 
 }  // namespace internal
 
diff --git a/cpp/src/arrow/util/utf8.h b/cpp/src/arrow/util/utf8.h
index af93705..cd5ac4a 100644
--- a/cpp/src/arrow/util/utf8.h
+++ b/cpp/src/arrow/util/utf8.h
@@ -78,9 +78,7 @@ static inline uint16_t ValidateOneUTF8Byte(uint8_t byte, 
uint16_t state) {
   return utf8_large_table[state + byte];
 }
 
-#ifndef NDEBUG
 ARROW_EXPORT void CheckUTF8Initialized();
-#endif
 
 }  // namespace internal
 

Reply via email to