From 72b9ca7d05e8150bae98fda96221de3d985654f8 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 14 Sep 2025 14:56:45 -0400 Subject: More typed-get functions --- examples/read_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/read_conf.c') diff --git a/examples/read_conf.c b/examples/read_conf.c index 1bff840..24fade0 100644 --- a/examples/read_conf.c +++ b/examples/read_conf.c @@ -13,9 +13,9 @@ int main(int argc, char **argv) { free(error); return EXIT_FAILURE; } - int64_t value; - const char *s = pom_conf_get_int(conf, "number.best", &value); - printf("%" PRId64 "\n", value); + double value; + const char *s = pom_conf_get_float_or_default(conf, "number.best", &value, 3.6); + printf("%f\n", value); if (s) printf(" -> %s\n",s); pom_conf_print(conf); pom_conf_free(conf); -- cgit v1.2.3