[seed] libseed: seed_value_to_boolean should permit JSValueIsNumber, and not just return FALSE



commit 3b440058f07ebf37992d89367776ca438321924e
Author: Robert Carr <racarr svn gnome org>
Date:   Wed May 27 03:58:43 2009 -0400

    libseed: seed_value_to_boolean should permit JSValueIsNumber, and not just return FALSE
---
 libseed/seed-types.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index 03ac2d1..7b55a01 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -1279,7 +1279,7 @@ gboolean
 seed_value_to_boolean (JSContextRef ctx,
 		       JSValueRef val, JSValueRef * exception)
 {
-  if (!JSValueIsBoolean (ctx, val))
+  if (!JSValueIsBoolean (ctx, val) && !JSValueIsNumber (ctx, val))
     {
       if (!JSValueIsNull (ctx, val))
 	{



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]