diff options
author | pommicket <pommicket@gmail.com> | 2025-09-14 12:53:39 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-14 12:53:39 -0400 |
commit | ee7e2dbf3d6bc4ef8d4019c666a8960976c1af75 (patch) | |
tree | c5b607087786e028f98e34de001fa9b1e0e08773 /pom.h | |
parent | c8ef3a67210c980d5d1ff2c1bd7d8fffd39846b5 (diff) |
Parse uint
Diffstat (limited to 'pom.h')
-rw-r--r-- | pom.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -230,10 +230,14 @@ bool pom_conf_location(const pom_conf *conf, const char *key, const char **file, uint64_t *line); /// Get value of `key` in configuration, or `NULL` if key is not present. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get(const pom_conf *conf, const char *key); /// Get value of `key` in configuration, or use `dflt` if not present. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get_or_default(const pom_conf *conf, const char *key, const char *dflt); @@ -246,6 +250,8 @@ pom_conf_get_or_default(const pom_conf *conf, const char *key, const char *dflt) /// (decimal or `0x`/`0X`-prefixed hexadecimal, absolute value less than 2<sup>53</sup>), /// returns the value of `key`. /// `*value` is set to 0 in these cases. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get_int(const pom_conf *conf, const char *key, int64_t *value); @@ -257,6 +263,8 @@ pom_conf_get_int(const pom_conf *conf, const char *key, int64_t *value); /// (decimal or `0x`/`0X`-prefixed hexadecimal, absolute value less than 2<sup>53</sup>), /// returns the value of `key`. /// `*value` is still set to `dflt` in this case. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get_int_or_default(const pom_conf *conf, const char *key, int64_t *value, int64_t dflt); @@ -268,6 +276,8 @@ pom_conf_get_int_or_default(const pom_conf *conf, const char *key, int64_t *valu /// (decimal or `0x`/`0X`-prefixed hexadecimal, less than 2<sup>53</sup>), /// returns the value of `key`. /// `*value` is set to 0 in these case cases. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get_uint(const pom_conf *conf, const char *key, uint64_t *value); @@ -279,6 +289,8 @@ pom_conf_get_uint(const pom_conf *conf, const char *key, uint64_t *value); /// (decimal or `0x`/`0X`-prefixed hexadecimal, less than 2<sup>53</sup>), /// returns the value of `key`. /// `*value` is set to 0 in this case. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get_uint_or_default(const pom_conf *conf, const char *key, uint64_t *value, uint64_t dflt); @@ -289,6 +301,8 @@ pom_conf_get_uint_or_default(const pom_conf *conf, const char *key, uint64_t *va /// If `key` is not set, returns `""`. If `key` is set but not a valid floating-point number, /// returns the value of `key`. /// `*value` is set to 0.0 in this case. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get_float(const pom_conf *conf, const char *key, double *value); @@ -299,6 +313,8 @@ pom_conf_get_float(const pom_conf *conf, const char *key, double *value); /// If `key` is set but not a valid floating-point number, /// returns the value of `key`. /// `*value` is still set to `dflt` in this case. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get_float_or_default(const pom_conf *conf, const char *key, double *value, double dflt); @@ -310,6 +326,8 @@ pom_conf_get_float_or_default(const pom_conf *conf, const char *key, double *val /// (`off`/`false`/`no`/`on`/`true`/`yes`), /// returns the value of `key`. /// `*value` is set to `false` in this case. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get_bool(const pom_conf *conf, const char *key, bool *value); @@ -321,6 +339,8 @@ pom_conf_get_bool(const pom_conf *conf, const char *key, bool *value); /// (`off`/`false`/`no`/`on`/`true`/`yes`), /// returns the value of `key`. /// `*value` is still set to `dflt` in this case. +/// +/// The returned pointer is valid until \ref pom_conf_free is called. const char * pom_conf_get_bool_or_default(const pom_conf *conf, const char *key, bool *value, bool dflt); |