summaryrefslogtreecommitdiffstats
path: root/mono
diff options
context:
space:
mode:
authorOwen Fraser-Green <owen@discobabe.net>2004-05-01 19:59:58 +0000
committerOwen Fraser-Green <owen@discobabe.net>2004-05-01 19:59:58 +0000
commit3c6ef3df279344d3645009700f7a9c571f037bd2 (patch)
treea2cf0afaae7f2f6ae33c81ebfde4d61533ec8b16 /mono
parente16dafeb5fe958854953532a52eb959563495163 (diff)
Handle empty iterators properly!
Diffstat (limited to 'mono')
-rw-r--r--mono/Arguments.cs10
-rw-r--r--mono/DBusType/Array.cs4
-rw-r--r--mono/DBusType/Dict.cs4
3 files changed, 9 insertions, 9 deletions
diff --git a/mono/Arguments.cs b/mono/Arguments.cs
index 9b191a67..ca178aea 100644
--- a/mono/Arguments.cs
+++ b/mono/Arguments.cs
@@ -181,9 +181,9 @@ namespace DBus
string key = "";
// Iterate through the parameters getting the type codes to a string
- bool empty = dbus_message_iter_init(message.RawMessage, iter);
+ bool notEmpty = dbus_message_iter_init(message.RawMessage, iter);
- if (!empty) {
+ if (notEmpty) {
do {
char code = (char) dbus_message_iter_get_arg_type(iter);
if (code == '\0')
@@ -221,7 +221,7 @@ namespace DBus
{
private Arguments arguments;
private bool started = false;
- private bool empty = false;
+ private bool notEmpty = false;
private IntPtr iter = Marshal.AllocCoTaskMem(Arguments.DBusMessageIterSize);
public ArgumentsEnumerator(Arguments arguments)
@@ -241,13 +241,13 @@ namespace DBus
return dbus_message_iter_next(iter);
} else {
started = true;
- return !empty;
+ return notEmpty;
}
}
public void Reset()
{
- empty = dbus_message_iter_init(arguments.message.RawMessage, iter);
+ notEmpty = dbus_message_iter_init(arguments.message.RawMessage, iter);
started = false;
}
diff --git a/mono/DBusType/Array.cs b/mono/DBusType/Array.cs
index 917fa780..bf41763c 100644
--- a/mono/DBusType/Array.cs
+++ b/mono/DBusType/Array.cs
@@ -36,12 +36,12 @@ namespace DBus.DBusType
IntPtr arrayIter = Marshal.AllocCoTaskMem(Arguments.DBusMessageIterSize);
int elementTypeCode;
- bool empty = dbus_message_iter_init_array_iterator(iter, arrayIter, out elementTypeCode);
+ bool notEmpty = dbus_message_iter_init_array_iterator(iter, arrayIter, out elementTypeCode);
this.elementType = (Type) Arguments.DBusTypes[(char) elementTypeCode];
elements = new ArrayList();
- if (!empty) {
+ if (notEmpty) {
do {
object [] pars = new Object[2];
pars[0] = arrayIter;
diff --git a/mono/DBusType/Dict.cs b/mono/DBusType/Dict.cs
index e93d7d77..f5c76b4c 100644
--- a/mono/DBusType/Dict.cs
+++ b/mono/DBusType/Dict.cs
@@ -31,11 +31,11 @@ namespace DBus.DBusType
{
IntPtr dictIter = Marshal.AllocCoTaskMem(Arguments.DBusMessageIterSize);
- bool empty = dbus_message_iter_init_dict_iterator(iter, dictIter);
+ bool notEmpty = dbus_message_iter_init_dict_iterator(iter, dictIter);
this.val = new Hashtable();
- if (!empty) {
+ if (notEmpty) {
do {
string key = dbus_message_iter_get_dict_key(dictIter);