diff options
author | David Robillard <d@drobilla.net> | 2018-09-16 11:02:12 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-16 11:02:12 +0200 |
commit | dc81ec3cc0e66af75816d1cb43ab878dd4f2d9b9 (patch) | |
tree | 82e317a2b562a7c3af6d04bf81e70dac094cfc9b /src | |
parent | 28a78b7c8b06664a5ec8947987589c245c2c79d8 (diff) | |
download | lilv-dc81ec3cc0e66af75816d1cb43ab878dd4f2d9b9.tar.gz lilv-dc81ec3cc0e66af75816d1cb43ab878dd4f2d9b9.tar.bz2 lilv-dc81ec3cc0e66af75816d1cb43ab878dd4f2d9b9.zip |
Make handle parameter to lilv_path_exists const
Diffstat (limited to 'src')
-rw-r--r-- | src/lilv_internal.h | 5 | ||||
-rw-r--r-- | src/state.c | 6 | ||||
-rw-r--r-- | src/util.c | 5 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/lilv_internal.h b/src/lilv_internal.h index 15d2716..426eaaf 100644 --- a/src/lilv_internal.h +++ b/src/lilv_internal.h @@ -383,7 +383,7 @@ char* lilv_get_lang(void); char* lilv_expand(const char* path); char* lilv_dirname(const char* path); int lilv_copy_file(const char* src, const char* dst); -bool lilv_path_exists(const char* path, void* ignored); +bool lilv_path_exists(const char* path, const void* ignored); char* lilv_path_absolute(const char* path); bool lilv_path_is_absolute(const char* path); char* lilv_get_latest_copy(const char* path, const char* copy_path); @@ -398,7 +398,8 @@ bool lilv_file_equals(const char* a_path, const char* b_path); char* lilv_find_free_path(const char* in_path, - bool (*exists)(const char*, void*), void* user_data); + bool (*exists)(const char*, const void*), + const void* user_data); void lilv_dir_for_each(const char* path, diff --git a/src/state.c b/src/state.c index 2d1b349..23c1cc4 100644 --- a/src/state.c +++ b/src/state.c @@ -198,9 +198,9 @@ retrieve_callback(LV2_State_Handle handle, } static bool -lilv_state_has_path(const char* path, void* state) +lilv_state_has_path(const char* path, const void* state) { - return lilv_state_rel2abs((LilvState*)state, path) != path; + return lilv_state_rel2abs((const LilvState*)state, path) != path; } static char* @@ -872,7 +872,7 @@ add_state_to_manifest(LilvWorld* lworld, } static bool -link_exists(const char* path, void* data) +link_exists(const char* path, const void* data) { const char* target = (const char*)data; if (!lilv_path_exists(path, NULL)) { @@ -273,7 +273,7 @@ lilv_dirname(const char* path) } bool -lilv_path_exists(const char* path, void* ignored) +lilv_path_exists(const char* path, const void* ignored) { #ifdef HAVE_LSTAT struct stat st; @@ -285,7 +285,8 @@ lilv_path_exists(const char* path, void* ignored) char* lilv_find_free_path(const char* in_path, - bool (*exists)(const char*, void*), void* user_data) + bool (*exists)(const char*, const void*), + const void* user_data) { const size_t in_path_len = strlen(in_path); char* path = (char*)malloc(in_path_len + 7); |