浏览代码

Merge pull request #1596 from computerquip/const-correct-cmdline2

libobs: Allow const argument in obs_set_cmdline_args
Jim 6 年之前
父节点
当前提交
6a0b9517db
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      libobs/obs.c
  2. 1 1
      libobs/obs.h

+ 1 - 1
libobs/obs.c

@@ -854,7 +854,7 @@ bool obs_startup(const char *locale, const char *module_config_path,
 }
 }
 
 
 static struct obs_cmdline_args cmdline_args = {0, NULL};
 static struct obs_cmdline_args cmdline_args = {0, NULL};
-void obs_set_cmdline_args(int argc, char **argv)
+void obs_set_cmdline_args(int argc, const char * const *argv)
 {
 {
 	char *data;
 	char *data;
 	size_t len;
 	size_t len;

+ 1 - 1
libobs/obs.h

@@ -305,7 +305,7 @@ EXPORT const char *obs_get_version_string(void);
  * @param  argv  An array of command line arguments, copied from main() and ends
  * @param  argv  An array of command line arguments, copied from main() and ends
  *               with NULL.
  *               with NULL.
  */
  */
-EXPORT void obs_set_cmdline_args(int argc, char **argv);
+EXPORT void obs_set_cmdline_args(int argc, const char * const *argv);
 
 
 /**
 /**
  * Get the argc/argv used to start OBS
  * Get the argc/argv used to start OBS