im.pidgin.pidgin: 5473bd4fec59a55c8ad482c92cc518fea564a241

evands at pidgin.im evands at pidgin.im
Mon Oct 15 20:00:35 EDT 2007


-----------------------------------------------------------------
Revision: 5473bd4fec59a55c8ad482c92cc518fea564a241
Ancestor: 7a436ba53de6adebccf4e920ca62d544e13b1094
Author: evands at pidgin.im
Date: 2007-10-15T23:55:05
Branch: im.pidgin.pidgin

Modified files:
        libpurple/account.c

ChangeLog: 

Using i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465) for
compilation, I can't compile account.c because of the 'bool' component of
PurpleAccountSetting - it's apparently treating it as a type.  Changing it to
'boolean' is more consistent with the naming of the other parts of the union,
in any case. The error given is:
---
account.c:55: error: two or more data types in declaration specifiers
account.c:55: warning: declaration does not declare anything
account.c: In function 'setting_to_xmlnode':
account.c:107: error: syntax error before '_Bool'
----

-------------- next part --------------
============================================================
--- libpurple/account.c	7b72d1151464af49fc470e957c42d154ed8ff72b
+++ libpurple/account.c	e01143f1357d87110ac982d3e2a7c479019987d4
@@ -52,7 +52,7 @@ typedef struct
 	{
 		int integer;
 		char *string;
-		gboolean bool;
+		gboolean boolean;
 
 	} value;
 
@@ -104,7 +104,7 @@ setting_to_xmlnode(gpointer key, gpointe
 	}
 	else if (setting->type == PURPLE_PREF_BOOLEAN) {
 		xmlnode_set_attrib(child, "type", "bool");
-		snprintf(buf, sizeof(buf), "%d", setting->value.bool);
+		snprintf(buf, sizeof(buf), "%d", setting->value.boolean);
 		xmlnode_insert_data(child, buf, -1);
 	}
 }
@@ -1578,7 +1578,7 @@ purple_account_set_bool(PurpleAccount *a
 	setting = g_new0(PurpleAccountSetting, 1);
 
 	setting->type       = PURPLE_PREF_BOOLEAN;
-	setting->value.bool = value;
+	setting->value.boolean = value;
 
 	g_hash_table_insert(account->settings, g_strdup(name), setting);
 
@@ -1664,7 +1664,7 @@ purple_account_set_ui_bool(PurpleAccount
 
 	setting->type       = PURPLE_PREF_BOOLEAN;
 	setting->ui         = g_strdup(ui);
-	setting->value.bool = value;
+	setting->value.boolean = value;
 
 	table = get_ui_settings_table(account, ui);
 
@@ -1939,7 +1939,7 @@ purple_account_get_bool(const PurpleAcco
 
 	g_return_val_if_fail(setting->type == PURPLE_PREF_BOOLEAN, default_value);
 
-	return setting->value.bool;
+	return setting->value.boolean;
 }
 
 int
@@ -2005,7 +2005,7 @@ purple_account_get_ui_bool(const PurpleA
 
 	g_return_val_if_fail(setting->type == PURPLE_PREF_BOOLEAN, default_value);
 
-	return setting->value.bool;
+	return setting->value.boolean;
 }
 
 PurpleLog *


More information about the Commits mailing list