Commit 5739d896 authored by Jeremy Huddleston's avatar Jeremy Huddleston Committed by William Hua

Don't use fast enumeration in old version of Mac OS.

Signed-off-by: William Hua's avatarWilliam Hua <william@attente.ca>
parent 51a2661d
......@@ -340,7 +340,12 @@ g_nextstep_settings_backend_get_g_variant (id object,
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;
id value;
......@@ -376,7 +381,12 @@ g_nextstep_settings_backend_get_g_variant (id object,
value_type = g_variant_type_element (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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment