Commit 24d6b955 authored by Yoni Fogel's avatar Yoni Fogel

Cleaned up dodefine_track_enum

git-svn-id: file:///svn/toku/tokudb@17684 c7de825b-a66e-492c-adef-691d508d4ae1
parent b3e71841
...@@ -43,9 +43,10 @@ void print_db_notices (void) { ...@@ -43,9 +43,10 @@ void print_db_notices (void) {
printf("#define %s %d\n", #name, bit); \ printf("#define %s %d\n", #name, bit); \
} while (0) } while (0)
#define dodefine_track_enum(flags, name) do {assert(!(flags[name])); \ #define dodefine_track_enum(flags, name) do {assert(name>=0 && name<256); \
assert(!(flags[name])); \
flags[name] = 1; \ flags[name] = 1; \
printf("#define %s %d\n", #name, name);} while (0) printf("#define %s %d\n", #name, name);} while (0)
#define dodefine_from_track_enum(flags, name) do { \ #define dodefine_from_track_enum(flags, name) do { \
uint32_t which; \ uint32_t which; \
/* don't use 0 */ \ /* don't use 0 */ \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment