]> git.ipfire.org Git - pakfire.git/commitdiff
repo: Make path composition public
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 16:59:44 +0000 (16:59 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 16:59:44 +0000 (16:59 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/repo.c
src/pakfire/repo.h

index 90db8ff44960138cda96d0253c0db9e61048424a..671297c0efa4f850901b5d1ddb4a471b5d589ea2 100644 (file)
@@ -199,14 +199,7 @@ char* pakfire_repo_url_replace(struct pakfire_repo* repo, const char* url) {
        return buffer;
 }
 
-#define pakfire_repo_path(repo, path, format, ...) \
-       __pakfire_repo_path(repo, path, sizeof(path), format, __VA_ARGS__)
-
-static int __pakfire_repo_path(struct pakfire_repo* repo,
-               char* path, const size_t length, const char* format, ...)
-               __attribute__((format(printf, 4, 5)));
-
-static int __pakfire_repo_path(struct pakfire_repo* repo,
+int __pakfire_repo_path(struct pakfire_repo* repo,
                char* path, const size_t length, const char* format, ...) {
        char buffer[PATH_MAX];
        va_list args;
index 7b4e7996bcb1843ff9481d7becedd06cc47a8f46..df2bcbc9a3bbb2fec22a6fb774175e81ee36e8af 100644 (file)
@@ -71,6 +71,12 @@ int pakfire_repo_set_mirrorlist_url(struct pakfire_repo* repo, const char* url);
 
 struct pakfire_mirrorlist* pakfire_repo_get_mirrors(struct pakfire_repo* repo);
 
+#define pakfire_repo_path(repo, path, format, ...) \
+       __pakfire_repo_path(repo, path, sizeof(path), format, __VA_ARGS__)
+int __pakfire_repo_path(struct pakfire_repo* repo,
+       char* path, const size_t length, const char* format, ...)
+       __attribute__((format(printf, 4, 5)));
+
 int pakfire_repo_write_config(struct pakfire_repo* repo, FILE* f);
 
 int pakfire_repo_is_installed_repo(struct pakfire_repo* repo);