summaryrefslogtreecommitdiffstats
path: root/gobject
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2004-07-28 21:23:11 +0000
committerJohan Dahlin <johan@src.gnome.org>2004-07-28 21:23:11 +0000
commit6794170615d6afecb46e5533a2ae31622f2c6ff9 (patch)
treee6008adf855effe1f342deb564dae6d6526fb1ef /gobject
parenta0443783c880cf90b11886e3180e842e2c17a77a (diff)
Reverse operator
* gobject/pygenum.c (pyg_enum_compare): * gobject/pygflags.c (pyg_flags_compare): Reverse operator * tests/enum.py (FlagsTest.testComparision) (FlagsTest.testComparision): New tests
Diffstat (limited to 'gobject')
-rw-r--r--gobject/pygenum.c2
-rw-r--r--gobject/pygflags.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gobject/pygenum.c b/gobject/pygenum.c
index 89f1616..0f440ad 100644
--- a/gobject/pygenum.c
+++ b/gobject/pygenum.c
@@ -41,7 +41,7 @@ pyg_enum_compare(PyGEnum *self, PyObject *other)
if (GET_INT(self) == GET_INT(other))
return 0;
- else if (GET_INT(self) > GET_INT(other))
+ else if (GET_INT(self) < GET_INT(other))
return -1;
else
return 1;
diff --git a/gobject/pygflags.c b/gobject/pygflags.c
index baf5f7d..d897d8a 100644
--- a/gobject/pygflags.c
+++ b/gobject/pygflags.c
@@ -41,7 +41,7 @@ pyg_flags_compare(PyGFlags *self, PyObject *other)
if (GET_INT_VALUE(self) == GET_INT_VALUE(other))
return 0;
- else if (GET_INT_VALUE(self) > GET_INT_VALUE(other))
+ else if (GET_INT_VALUE(self) < GET_INT_VALUE(other))
return -1;
else
return 1;