diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-06-27 18:57:05 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-06-27 18:57:05 +0200 |
commit | 9c3ddcbc183a9a96f10cdb14f28258ea61f5f7c5 (patch) | |
tree | fdf88fe8e5f2af2ff75fb5f67f03ccdf509ef914 /src/include | |
parent | 537206e49f7ccc32551ea894547ee1583ea244ef (diff) | |
download | exchange-9c3ddcbc183a9a96f10cdb14f28258ea61f5f7c5.tar.xz |
added TALER_adult_age(struct TALER_AgeMask *mask)
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. |