diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/taler_util.h b/src/include/taler_util.h index dc30fca31..e0473bff7 100644 --- a/src/include/taler_util.h +++ b/src/include/taler_util.h @@ -622,6 +622,14 @@ TALER_get_lowest_age ( const struct TALER_AgeMask *mask, uint8_t age); +/* @brief Get the lowest age for the largest age group + * + * @param mask the age mask + * @return lowest age for the largest age group + */ +#define TALER_adult_age(mask) \ + sizeof((mask)->bits) * 8 - __builtin_clz ((mask)->bits) - 1 + /** * Handle to an external process that will assist * with some JSON-to-JSON conversion. |