Skip to content

Commit 1b84ff5

Browse files
committed
chore: export the headers
Signed-off-by: Junwang Zhao <[email protected]>
1 parent 67697e9 commit 1b84ff5

File tree

8 files changed

+14
-13
lines changed

8 files changed

+14
-13
lines changed

src/iceberg/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ set(ICEBERG_SOURCES
3939
type.cc
4040
util/murmurhash3_internal.cc
4141
util/timepoint.cc
42-
util/unreachable_internal.cc)
42+
util/unreachable.cc)
4343

4444
set(ICEBERG_STATIC_BUILD_INTERFACE_LIBS)
4545
set(ICEBERG_SHARED_BUILD_INTERFACE_LIBS)
File renamed without changes.

src/iceberg/util/unreachable_internal.cc renamed to src/iceberg/util/unreachable.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
* under the License.
1818
*/
1919

20-
#include "iceberg/util/unreachable_internal.h"
20+
#include "iceberg/util/unreachable.h"
2121

22-
namespace iceberg {
22+
#include <cstdlib>
23+
24+
namespace iceberg::internal {
2325

2426
// TODO(anyone): log the message before aborting
2527
[[noreturn]] void Unreachable([[maybe_unused]] const char* message) { std::abort(); }
2628

2729
[[noreturn]] void Unreachable([[maybe_unused]] std::string_view message) { std::abort(); }
2830

29-
} // namespace iceberg
31+
} // namespace iceberg::internal

src/iceberg/util/unreachable_internal.h renamed to src/iceberg/util/unreachable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323

2424
#include "iceberg/iceberg_export.h"
2525

26-
namespace iceberg {
26+
namespace iceberg::internal {
2727

2828
[[noreturn]] ICEBERG_EXPORT void Unreachable(
2929
[[maybe_unused]] const char* message = "Unreachable");
3030

3131
[[noreturn]] ICEBERG_EXPORT void Unreachable([[maybe_unused]] std::string_view message);
3232

33-
} // namespace iceberg
33+
} // namespace iceberg::internal

src/iceberg/util/visit_type_internal.h renamed to src/iceberg/util/visit_type.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121

2222
#include "iceberg/result.h"
2323
#include "iceberg/type.h"
24-
#include "iceberg/util/checked_cast_internal.h"
25-
#include "iceberg/util/unreachable_internal.h"
26-
#include "iceberg/util/visitor_generate_internal.h"
24+
#include "iceberg/util/checked_cast.h"
25+
#include "iceberg/util/unreachable.h"
26+
#include "iceberg/util/visitor_generate.h"
2727

2828
namespace iceberg {
2929

@@ -88,7 +88,7 @@ inline auto VisitType(const Type& type, VISITOR&& visitor, ARGS&&... args)
8888
switch (type.type_id()) {
8989
ICEBERG_GENERATE_FOR_ALL_TYPES(TYPE_VISIT_INLINE);
9090
default:
91-
Unreachable("Type not implemented");
91+
internal::Unreachable("Type not implemented");
9292
}
9393
}
9494

File renamed without changes.

test/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ target_link_libraries(json_serde_test PRIVATE iceberg_static GTest::gtest_main
5858
add_test(NAME json_serde_test COMMAND json_serde_test)
5959

6060
add_executable(util_test)
61-
target_sources(util_test PRIVATE expected_test.cc formatter_test.cc config_test.cc
62-
visit_type_internal_test.cc)
61+
target_sources(util_test PRIVATE expected_test.cc formatter_test.cc config_test.cc visit_type_test.cc)
6362
target_link_libraries(util_test PRIVATE iceberg_static GTest::gtest_main GTest::gmock)
6463
add_test(NAME util_test COMMAND util_test)
6564

test/visit_type_internal_test.cc renamed to test/visit_type_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
#include "iceberg/util/visit_type_internal.h"
20+
#include "iceberg/util/visit_type.h"
2121

2222
#include <sstream>
2323

0 commit comments

Comments
 (0)