summaryrefslogtreecommitdiffstats
path: root/bftw.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-05-05 15:46:55 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-05-05 22:56:27 -0400
commitdf7d960b0d7e1f9bd8aa58654760e41b6282f78a (patch)
tree9fc241b2fd0924cacc61c91eed8cb69b6874d764 /bftw.h
parent690d0467d1cb98247b72ee570dc49b225d63a5ec (diff)
downloadbfs-df7d960b0d7e1f9bd8aa58654760e41b6282f78a.tar.xz
bftw: Pass a const struct BFTW * to the callback
Diffstat (limited to 'bftw.h')
-rw-r--r--bftw.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/bftw.h b/bftw.h
index 626a6d8..568db9a 100644
--- a/bftw.h
+++ b/bftw.h
@@ -127,7 +127,7 @@ struct BFTW {
* @return
* A pointer to a bfs_stat() buffer, or NULL if the call failed.
*/
-const struct bfs_stat *bftw_stat(struct BFTW *ftwbuf, enum bfs_stat_flag flags);
+const struct bfs_stat *bftw_stat(const struct BFTW *ftwbuf, enum bfs_stat_flag flags);
/**
* Get the type of a file encountered during bftw(), with flags controlling
@@ -141,7 +141,7 @@ const struct bfs_stat *bftw_stat(struct BFTW *ftwbuf, enum bfs_stat_flag flags);
* @return
* The type of the file, or BFTW_ERROR if an error occurred.
*/
-enum bftw_typeflag bftw_typeflag(struct BFTW *ftwbuf, enum bfs_stat_flag flags);
+enum bftw_typeflag bftw_typeflag(const struct BFTW *ftwbuf, enum bfs_stat_flag flags);
/**
* Walk actions returned by the bftw() callback.
@@ -167,7 +167,7 @@ enum bftw_action {
* @return
* An action value.
*/
-typedef enum bftw_action bftw_callback(struct BFTW *ftwbuf, void *ptr);
+typedef enum bftw_action bftw_callback(const struct BFTW *ftwbuf, void *ptr);
/**
* Flags that control bftw() behavior.