diff options
author | David Robillard <d@drobilla.net> | 2024-12-11 00:12:20 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-12-11 00:22:47 -0500 |
commit | c5c23c3e27ab765c8df28088fbec5f41b89bb8b8 (patch) | |
tree | 366e170112dc7855f7bf1f8c0e6940260e492b9e /src/posix | |
parent | 790d111fb7b7c4393fa768980741348196b36740 (diff) | |
download | zix-c5c23c3e27ab765c8df28088fbec5f41b89bb8b8.tar.gz zix-c5c23c3e27ab765c8df28088fbec5f41b89bb8b8.tar.bz2 zix-c5c23c3e27ab765c8df28088fbec5f41b89bb8b8.zip |
Add ZixDirEntryVisitFunc
Although this type is only used once in the API, define it to avoid the
complicated syntax of inline function pointer parameters, which confuses both
people and clang-format.
Diffstat (limited to 'src/posix')
-rw-r--r-- | src/posix/filesystem_posix.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/posix/filesystem_posix.c b/src/posix/filesystem_posix.c index 7553916..2ee323a 100644 --- a/src/posix/filesystem_posix.c +++ b/src/posix/filesystem_posix.c @@ -300,11 +300,9 @@ zix_remove(const char* const path) } void -zix_dir_for_each(const char* const path, - void* const data, - void (*const f)(const char* path, - const char* name, - void* data)) +zix_dir_for_each(const char* const path, + void* const data, + const ZixDirEntryVisitFunc f) { DIR* dir = opendir(path); if (dir) { |