[gjs] Normalize flag checks to booleans
- From: Johan Bilien <jobi src gnome org>
- To: svn-commits-list gnome org
- Subject: [gjs] Normalize flag checks to booleans
- Date: Tue, 24 Mar 2009 13:01:30 -0400 (EDT)
commit 85be663892d69104500b52773216aab81b8222df
Author: Johan Bilien <jobi litl com>
Date: Tue Mar 24 16:56:58 2009 +0000
Normalize flag checks to booleans
---
gi/object.c | 2 +-
gi/value.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gi/object.c b/gi/object.c
index b4d5f1c..da9c2e6 100644
--- a/gi/object.c
+++ b/gi/object.c
@@ -1088,7 +1088,7 @@ emit_func(JSContext *context,
value = &instance_and_args[i + 1];
g_value_init(value, signal_query.param_types[i] & ~G_SIGNAL_TYPE_STATIC_SCOPE);
- if (signal_query.param_types[i] & G_SIGNAL_TYPE_STATIC_SCOPE)
+ if ((signal_query.param_types[i] & G_SIGNAL_TYPE_STATIC_SCOPE) != 0)
failed = !gjs_value_to_g_value_no_copy(context, argv[i+1], value);
else
failed = !gjs_value_to_g_value(context, argv[i+1], value);
diff --git a/gi/value.c b/gi/value.c
index 0f37dd5..887f8c0 100644
--- a/gi/value.c
+++ b/gi/value.c
@@ -102,7 +102,7 @@ closure_marshal(GClosure *closure,
no_copy = FALSE;
if (i >= 1 && signal_query.signal_id) {
- no_copy = signal_query.param_types[i - 1] & G_SIGNAL_TYPE_STATIC_SCOPE;
+ no_copy = (signal_query.param_types[i - 1] & G_SIGNAL_TYPE_STATIC_SCOPE) != 0;
}
if (!gjs_value_from_g_value_internal(context, &argv[i], gval, no_copy)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]