susumu.yata
null+****@clear*****
Wed Jun 5 17:46:43 JST 2013
susumu.yata 2013-06-05 17:46:43 +0900 (Wed, 05 Jun 2013) New Revision: 1978b5f6b8affb87a60e4a6300c38a6c2bc57e0c https://github.com/groonga/grnxx/commit/1978b5f6b8affb87a60e4a6300c38a6c2bc57e0c Message: Use Grnxx::version() instead of GRNXX_VERSION. Because version.h is generated after the compilation of header.cpp. Modified files: lib/grnxx/storage/header.cpp Modified: lib/grnxx/storage/header.cpp (+2 -3) =================================================================== --- lib/grnxx/storage/header.cpp 2013-06-05 16:48:56 +0900 (f891bab) +++ lib/grnxx/storage/header.cpp 2013-06-05 17:46:43 +0900 (04c0afd) @@ -19,11 +19,10 @@ #include <cstring> -#include "grnxx/version.h" +#include "grnxx/grnxx.hpp" #include "grnxx/storage.hpp" #define GRNXX_STORAGE_HEADER_FORMAT "grnxx::Storage" -#define GRNXX_STORAGE_HEADER_VERSION GRNXX_VERSION namespace grnxx { namespace storage { @@ -55,7 +54,7 @@ Header::Header() data_mutex(MUTEX_UNLOCKED), file_mutex(MUTEX_UNLOCKED), reserved_2{} { - std::memcpy(version, GRNXX_STORAGE_HEADER_VERSION, HEADER_VERSION_SIZE); + std::strcpy(version, Grnxx::version()); for (size_t i = 0; i < NUM_IDLE_NODE_LISTS; ++i) { oldest_idle_node_ids[i] = STORAGE_INVALID_NODE_ID; } -------------- next part -------------- HTML����������������������������...Download