mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
Use g_variant_is_of_type()
... instead of strcmp()'ing the type strings. Bug #620954.
This commit is contained in:
parent
b75e7eb95d
commit
d3b091f63a
@ -407,7 +407,7 @@ g_application_register_with_data (GApplication *application,
|
||||
g_return_if_fail (application->priv->appid != NULL);
|
||||
g_return_if_fail (application->priv->is_remote);
|
||||
g_return_if_fail (platform_data == NULL
|
||||
|| strcmp (g_variant_get_type_string (platform_data), "a{sv}") == 0);
|
||||
|| g_variant_is_of_type (platform_data, G_VARIANT_TYPE ("a{sv}")) == 0);
|
||||
|
||||
if (!_g_application_platform_acquire_single_instance (application, NULL))
|
||||
{
|
||||
|
@ -332,7 +332,7 @@ _g_application_platform_acquire_single_instance (GApplication *app,
|
||||
if (request_result == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (strcmp (g_variant_get_type_string (request_result), "(u)") == 0)
|
||||
if (g_variant_is_of_type (request_result, G_VARIANT_TYPE ("(u)")))
|
||||
g_variant_get (request_result, "(u)", &request_status);
|
||||
else
|
||||
request_status = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user