aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/cli.c4
-rw-r--r--src/stdlib/optionals.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/stdlib/cli.c b/src/stdlib/cli.c
index e30f7ced..29a16634 100644
--- a/src/stdlib/cli.c
+++ b/src/stdlib/cli.c
@@ -53,7 +53,7 @@ static bool pop_boolean_cli_flag(List_t *args, char short_flag, const char *flag
return true;
}
} else if (short_flag && arg[0] == '-' && arg[1] != '-' && strchr(arg + 1, short_flag)) {
- char *loc = strchr(arg + 1, short_flag);
+ const char *loc = strchr(arg + 1, short_flag);
if (loc[1] == '=') {
// Case: -f=yes|no|true|false|on|off|1|0
OptionalBool_t b = Bool$parse(Text$from_str(loc + 2), NULL);
@@ -347,7 +347,7 @@ bool pop_cli_flag(List_t *args, char short_flag, const char *flag, void *dest, c
return true;
}
} else if (short_flag && arg[0] == '-' && arg[1] != '-' && strchr(arg + 1, short_flag)) {
- char *loc = strchr(arg + 1, short_flag);
+ const char *loc = strchr(arg + 1, short_flag);
char short_str[2] = {short_flag, '\0'};
if (loc[1] == '=') {
// Case: -f=...
diff --git a/src/stdlib/optionals.h b/src/stdlib/optionals.h
index 700a4ada..50dbd4de 100644
--- a/src/stdlib/optionals.h
+++ b/src/stdlib/optionals.h
@@ -15,7 +15,7 @@
#define NONE_TABLE ((OptionalTable_t){.entries.data = NULL})
#define NONE_CLOSURE ((OptionalClosure_t){.fn = NULL})
#define NONE_TEXT ((OptionalText_t){.tag = TEXT_NONE})
-#define NONE_PATH ((OptionalPath_t){.$tag = Path$tag$none})
+#define NONE_PATH (Path_t) NULL
PUREFUNC bool is_none(const void *obj, const TypeInfo_t *non_optional_type);
PUREFUNC uint64_t Optional$hash(const void *obj, const TypeInfo_t *type);