mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
Don't use fast enumeration in old version of Mac OS.
Signed-off-by: William Hua <william@attente.ca>
This commit is contained in:
parent
51a2661da6
commit
5739d896f8
@ -340,7 +340,12 @@ g_nextstep_settings_backend_get_g_variant (id object,
|
|||||||
|
|
||||||
g_variant_builder_init (&builder, type);
|
g_variant_builder_init (&builder, type);
|
||||||
|
|
||||||
for (key in object)
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
||||||
|
for(key in object)
|
||||||
|
#else
|
||||||
|
NSEnumerator *enumerator = [object objectEnumerator];
|
||||||
|
while((key = [enumerator nextObject]))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
GVariant *name;
|
GVariant *name;
|
||||||
id value;
|
id value;
|
||||||
@ -376,7 +381,12 @@ g_nextstep_settings_backend_get_g_variant (id object,
|
|||||||
value_type = g_variant_type_element (type);
|
value_type = g_variant_type_element (type);
|
||||||
g_variant_builder_init (&builder, type);
|
g_variant_builder_init (&builder, type);
|
||||||
|
|
||||||
for (value in object)
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
||||||
|
for(value in object)
|
||||||
|
#else
|
||||||
|
NSEnumerator *enumerator = [object objectEnumerator];
|
||||||
|
while((value = [enumerator nextObject]))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
GVariant *variant = g_nextstep_settings_backend_get_g_variant (value, value_type);
|
GVariant *variant = g_nextstep_settings_backend_get_g_variant (value, value_type);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user