diff options
author | George Hazan <ghazan@miranda.im> | 2019-08-28 18:35:09 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-08-28 18:35:09 +0300 |
commit | dc7dfedb811ebac3b078113443da231043bd4b29 (patch) | |
tree | 04ba9abd6ba6fe57244f138048833f071f2857c1 /libs/libmdbx/src/test/config.h | |
parent | 491d424f91413ca196d0611c36605651b7723433 (diff) |
libmdbx: merge with 0.3.2
Diffstat (limited to 'libs/libmdbx/src/test/config.h')
-rw-r--r-- | libs/libmdbx/src/test/config.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/libs/libmdbx/src/test/config.h b/libs/libmdbx/src/test/config.h index b8a4b6827d..89889d8eb6 100644 --- a/libs/libmdbx/src/test/config.h +++ b/libs/libmdbx/src/test/config.h @@ -38,7 +38,8 @@ enum actor_status { as_running, as_successful, as_killed, - as_failed + as_failed, + as_coredump, }; const char *testcase2str(const actor_testcase); @@ -101,6 +102,22 @@ bool parse_option(int argc, char *const argv[], int &narg, const char *option, bool parse_option(int argc, char *const argv[], int &narg, const char *option, int32_t &value, const int32_t minval, const int32_t maxval, const int32_t default_value = -1); + +inline bool parse_option_intptr(int argc, char *const argv[], int &narg, + const char *option, intptr_t &value, + const intptr_t minval, const intptr_t maxval, + const intptr_t default_value = -1) { + static_assert(sizeof(intptr_t) == 4 || sizeof(intptr_t) == 8, "WTF?"); + if (sizeof(intptr_t) == 8) + return parse_option(argc, argv, narg, option, + *reinterpret_cast<int64_t *>(&value), int64_t(minval), + int64_t(maxval), int64_t(default_value)); + else + return parse_option(argc, argv, narg, option, + *reinterpret_cast<int32_t *>(&value), int32_t(minval), + int32_t(maxval), int32_t(default_value)); +} + //----------------------------------------------------------------------------- #pragma pack(push, 1) @@ -248,6 +265,7 @@ struct actor_params_pod { keygen_params_pod keygen; bool drop_table; + bool ignore_dbfull; }; struct actor_config_pod { |