From 3ddb95cae3c31fb10ead19a24297e13b4573e1be Mon Sep 17 00:00:00 2001 From: Alonso Schaich Date: Fri, 15 Nov 2024 23:55:47 +0900 Subject: [PATCH] Add more accessors for global variables --- tkrzw_lib_common.cc | 8 ++++++++ tkrzw_lib_common.h | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/tkrzw_lib_common.cc b/tkrzw_lib_common.cc index b84499d..7a9745e 100644 --- a/tkrzw_lib_common.cc +++ b/tkrzw_lib_common.cc @@ -18,6 +18,14 @@ namespace tkrzw { +int32_t GetMaxNumberBufferSize() { + return NUM_BUFFER_SIZE; +} + +int64_t GetMaxMemorySize() { + return MAX_MEMORY_SIZE; +} + int32_t GetPageSize() { #if defined(_SYS_WINDOWS_) diff --git a/tkrzw_lib_common.h b/tkrzw_lib_common.h index 80d4fef..8b16faf 100644 --- a/tkrzw_lib_common.h +++ b/tkrzw_lib_common.h @@ -142,6 +142,12 @@ extern const bool IS_POSIX; /** True if the byte order is big endian. */ extern const bool IS_BIG_ENDIAN; +/** The buffer size for a numeric string expression. */ +int32_t GetMaxNumberBufferSize(); + +/** The maximum memory size. */ +int64_t GetMaxMemorySize(); + /** The size of a memory page on the OS. */ int32_t GetPageSize();