[FFmpeg-cvslog] dict: const correctness for av_dict_get() and av_dict_copy()

Diego Biurrun git at videolan.org
Thu Jun 5 19:05:47 CEST 2014


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Jun  4 04:58:33 2014 -0700| [d816e125fe1fa5c909b706d47904a4d6c1799996] | committer: Diego Biurrun

dict: const correctness for av_dict_get() and av_dict_copy()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d816e125fe1fa5c909b706d47904a4d6c1799996
---

 libavutil/dict.c |    4 ++--
 libavutil/dict.h |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libavutil/dict.c b/libavutil/dict.c
index 3b95aba..7b4dbf2 100644
--- a/libavutil/dict.c
+++ b/libavutil/dict.c
@@ -35,7 +35,7 @@ int av_dict_count(const AVDictionary *m)
     return m ? m->count : 0;
 }
 
-AVDictionaryEntry *av_dict_get(AVDictionary *m, const char *key,
+AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
                                const AVDictionaryEntry *prev, int flags)
 {
     unsigned int i, j;
@@ -178,7 +178,7 @@ void av_dict_free(AVDictionary **pm)
     av_freep(pm);
 }
 
-void av_dict_copy(AVDictionary **dst, AVDictionary *src, int flags)
+void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
 {
     AVDictionaryEntry *t = NULL;
 
diff --git a/libavutil/dict.h b/libavutil/dict.h
index e0a91ae..e4aee27 100644
--- a/libavutil/dict.h
+++ b/libavutil/dict.h
@@ -83,8 +83,8 @@ typedef struct AVDictionary AVDictionary;
  * @param flags Allows case as well as suffix-insensitive comparisons.
  * @return Found entry or NULL, changing key or value leads to undefined behavior.
  */
-AVDictionaryEntry *
-av_dict_get(AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags);
+AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
+                               const AVDictionaryEntry *prev, int flags);
 
 /**
  * Get number of entries in dictionary.
@@ -131,7 +131,7 @@ int av_dict_parse_string(AVDictionary **pm, const char *str,
  * @param flags flags to use when setting entries in *dst
  * @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
  */
-void av_dict_copy(AVDictionary **dst, AVDictionary *src, int flags);
+void av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);
 
 /**
  * Free all the memory allocated for an AVDictionary struct



More information about the ffmpeg-cvslog mailing list