MXS-2013 Move or remove STR-macros

- The ones that were not used were removed.
- The ones that were used were moved close to the actual type.
  In most cases some values were missing and if the definition is
  close to the type there is a remote chance that they will stay
  in sync. If detached, they surely will not.
This commit is contained in:
Johan Wikman
2018-08-14 15:58:44 +03:00
parent ae43e4f0f2
commit f975035e53
8 changed files with 66 additions and 147 deletions

View File

@ -35,6 +35,14 @@ typedef enum
HINT_PARAMETER
} HINT_TYPE;
#define STRHINTTYPE(t) (t == HINT_ROUTE_TO_MASTER ? "HINT_ROUTE_TO_MASTER" : \
((t) == HINT_ROUTE_TO_SLAVE ? "HINT_ROUTE_TO_SLAVE" : \
((t) == HINT_ROUTE_TO_NAMED_SERVER ? "HINT_ROUTE_TO_NAMED_SERVER" : \
((t) == HINT_ROUTE_TO_UPTODATE_SERVER ? "HINT_ROUTE_TO_UPTODATE_SERVER" : \
((t) == HINT_ROUTE_TO_ALL ? "HINT_ROUTE_TO_ALL" : \
((t) == HINT_ROUTE_TO_LAST_USED ? "HINT_ROUTE_TO_LAST_USED" :\
((t) == HINT_PARAMETER ? "HINT_PARAMETER" : "UNKNOWN HINT TYPE")))))))
/**
* A generic hint.
*