Mercurial > mplayer.hg
changeset 33520:2df1a5fee8a7
Mark some char * arguments that are strdup'd const,
makes the API slightly clearer.
author | reimar |
---|---|
date | Mon, 13 Jun 2011 19:39:18 +0000 |
parents | 4d0f63ed8271 |
children | 8966911e5233 |
files | playtree.c playtree.h |
diffstat | 2 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/playtree.c Mon Jun 13 19:33:17 2011 +0000 +++ b/playtree.c Mon Jun 13 19:39:18 2011 +0000 @@ -279,7 +279,7 @@ void -play_tree_add_file(play_tree_t* pt,char* file) { +play_tree_add_file(play_tree_t* pt,const char* file) { int n = 0; #ifdef MP_DEBUG @@ -310,7 +310,7 @@ } int -play_tree_remove_file(play_tree_t* pt,char* file) { +play_tree_remove_file(play_tree_t* pt,const char* file) { int n,f = -1; #ifdef MP_DEBUG @@ -349,7 +349,7 @@ } void -play_tree_set_param(play_tree_t* pt, char* name, char* val) { +play_tree_set_param(play_tree_t* pt, const char* name, const char* val) { int n = 0; #ifdef MP_DEBUG @@ -373,7 +373,7 @@ } int -play_tree_unset_param(play_tree_t* pt, char* name) { +play_tree_unset_param(play_tree_t* pt, const char* name) { int n,ni = -1; #ifdef MP_DEBUG @@ -931,7 +931,7 @@ } //Add a new file as a new entry -void pt_add_file(play_tree_t** ppt, char* filename) +void pt_add_file(play_tree_t** ppt, const char* filename) { play_tree_t *pt = *ppt, *entry = play_tree_new(); #ifdef MP_DEBUG
--- a/playtree.h Mon Jun 13 19:33:17 2011 +0000 +++ b/playtree.h Mon Jun 13 19:39:18 2011 +0000 @@ -179,20 +179,20 @@ /// Add a file to an item. void -play_tree_add_file(play_tree_t* pt,char* file); +play_tree_add_file(play_tree_t* pt,const char* file); /// Remove a file from an item. int -play_tree_remove_file(play_tree_t* pt,char* file); +play_tree_remove_file(play_tree_t* pt,const char* file); /// Add a config paramter to an item. void -play_tree_set_param(play_tree_t* pt, char* name, char* val); +play_tree_set_param(play_tree_t* pt, const char* name, const char* val); /// Remove a config parameter from an item. int -play_tree_unset_param(play_tree_t* pt, char* name); +play_tree_unset_param(play_tree_t* pt, const char* name); /// Copy the config parameters from one item to another. void @@ -284,7 +284,7 @@ void pt_iter_replace_entry(play_tree_iter_t* iter, play_tree_t* entry); /// Adds a new file to the playtree, if it is not valid it is created. -void pt_add_file(play_tree_t** ppt, char* filename); +void pt_add_file(play_tree_t** ppt, const char* filename); // Macro to use only the iter and not the other things. #define pt_iter_add_file(iter, filename) pt_add_file(&iter->tree, filename)