aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/paths.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/paths.h')
-rw-r--r--src/stdlib/paths.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/stdlib/paths.h b/src/stdlib/paths.h
index 677631b2..7a175099 100644
--- a/src/stdlib/paths.h
+++ b/src/stdlib/paths.h
@@ -12,6 +12,9 @@
Path_t Path$from_str(const char *str);
Path_t Path$from_text(Text_t text);
// int Path$print(FILE *f, Path_t path);
+// UNSAFE: this works because each type of path has a .components in the same place
+#define Path$components(path) ((path).components)
+// END UNSAFE
const char *Path$as_c_string(Path_t path);
#define Path(str) Path$from_str(str)
Path_t Path$_concat(int n, Path_t items[n]);
@@ -69,5 +72,7 @@ bool Path$is_none(const void *obj, const TypeInfo_t *type);
void Path$serialize(const void *obj, FILE *out, Table_t *pointers, const TypeInfo_t *type);
void Path$deserialize(FILE *in, void *obj, List_t *pointers, const TypeInfo_t *type);
+extern const TypeInfo_t Path$AbsolutePath$$info;
+extern const TypeInfo_t Path$RelativePath$$info;
+extern const TypeInfo_t Path$HomePath$$info;
extern const TypeInfo_t Path$info;
-extern const TypeInfo_t PathType$info;