提交 0e88eb3a authored 作者: Anthony Minessale's avatar Anthony Minessale

add const to macro

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10014 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 baf65608
...@@ -376,7 +376,7 @@ SWITCH_DECLARE(switch_time_t) switch_str_time(const char *in); ...@@ -376,7 +376,7 @@ SWITCH_DECLARE(switch_time_t) switch_str_time(const char *in);
\param fname the function name to declare \param fname the function name to declare
\param vname the name of the global pointer to modify with the new function \param vname the name of the global pointer to modify with the new function
*/ */
#define SWITCH_DECLARE_GLOBAL_STRING_FUNC(fname, vname) static void fname(char *string) { if (!string) return;\ #define SWITCH_DECLARE_GLOBAL_STRING_FUNC(fname, vname) static void fname(const char *string) { if (!string) return;\
if (vname) {free(vname); vname = NULL;}vname = strdup(string);} static void fname(char *string) if (vname) {free(vname); vname = NULL;}vname = strdup(string);} static void fname(char *string)
/*! /*!
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论