mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
install-plugins: constify _install_*sync() details array arguments
This commit is contained in:
parent
72edcd33b5
commit
202cd3c17c
3 changed files with 12 additions and 11 deletions
|
@ -489,7 +489,7 @@ ptr_array_contains_string (GPtrArray * arr, const gchar * s)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_install_plugins_spawn_child (gchar ** details,
|
||||
gst_install_plugins_spawn_child (const gchar * const *details,
|
||||
GstInstallPluginsContext * ctx, GPid * child_pid, gint * exit_status)
|
||||
{
|
||||
GPtrArray *arr;
|
||||
|
@ -511,7 +511,7 @@ gst_install_plugins_spawn_child (gchar ** details,
|
|||
/* finally, add the detail strings, but without duplicates */
|
||||
while (details != NULL && details[0] != NULL) {
|
||||
if (!ptr_array_contains_string (arr, details[0]))
|
||||
g_ptr_array_add (arr, details[0]);
|
||||
g_ptr_array_add (arr, (gpointer) details[0]);
|
||||
++details;
|
||||
}
|
||||
|
||||
|
@ -618,8 +618,9 @@ gst_install_plugins_installer_exited (GPid pid, gint status, gpointer data)
|
|||
*/
|
||||
|
||||
GstInstallPluginsReturn
|
||||
gst_install_plugins_async (gchar ** details, GstInstallPluginsContext * ctx,
|
||||
GstInstallPluginsResultFunc func, gpointer user_data)
|
||||
gst_install_plugins_async (const gchar * const *details,
|
||||
GstInstallPluginsContext * ctx, GstInstallPluginsResultFunc func,
|
||||
gpointer user_data)
|
||||
{
|
||||
GstInstallPluginsAsyncHelper *helper;
|
||||
GPid pid;
|
||||
|
@ -665,7 +666,8 @@ gst_install_plugins_async (gchar ** details, GstInstallPluginsContext * ctx,
|
|||
* Returns: the result of the installation.
|
||||
*/
|
||||
GstInstallPluginsReturn
|
||||
gst_install_plugins_sync (gchar ** details, GstInstallPluginsContext * ctx)
|
||||
gst_install_plugins_sync (const gchar * const *details,
|
||||
GstInstallPluginsContext * ctx)
|
||||
{
|
||||
gint status;
|
||||
|
||||
|
|
|
@ -118,12 +118,12 @@ GType gst_install_plugins_context_get_type (void);
|
|||
typedef void (*GstInstallPluginsResultFunc) (GstInstallPluginsReturn result,
|
||||
gpointer user_data);
|
||||
|
||||
GstInstallPluginsReturn gst_install_plugins_async (gchar ** details,
|
||||
GstInstallPluginsReturn gst_install_plugins_async (const gchar * const * details,
|
||||
GstInstallPluginsContext * ctx,
|
||||
GstInstallPluginsResultFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
GstInstallPluginsReturn gst_install_plugins_sync (gchar ** details,
|
||||
GstInstallPluginsReturn gst_install_plugins_sync (const gchar * const * details,
|
||||
GstInstallPluginsContext * ctx);
|
||||
|
||||
const gchar * gst_install_plugins_return_get_name (GstInstallPluginsReturn ret);
|
||||
|
|
|
@ -480,7 +480,7 @@ result_cb (GstInstallPluginsReturn result, gpointer user_data)
|
|||
|
||||
/* make sure our script gets called with the right parameters */
|
||||
static void
|
||||
test_pb_utils_install_plugins_do_callout (gchar ** details,
|
||||
test_pb_utils_install_plugins_do_callout (const gchar * const *details,
|
||||
GstInstallPluginsContext * ctx, const gchar * script,
|
||||
GstInstallPluginsReturn expected_result)
|
||||
{
|
||||
|
@ -548,9 +548,8 @@ GST_START_TEST (test_pb_utils_install_plugins)
|
|||
{
|
||||
GstInstallPluginsContext *ctx;
|
||||
GstInstallPluginsReturn ret;
|
||||
gchar *details[] = { (char *) "detail1", (char *) "detail2", NULL };
|
||||
gchar *details_multi[] =
|
||||
{ (char *) "detail1", (char *) "detail1", (char *) "detail2", NULL };
|
||||
const gchar *details[] = { "detail1", "detail2", NULL };
|
||||
const gchar *details_multi[] = { "detail1", "detail1", "detail2", NULL };
|
||||
|
||||
ctx = gst_install_plugins_context_new ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue