[seed] libseed: seed_gobject_equals and the .equals() method has been useless since toggle refs were added



commit 4bbbff52cc0f3b9069591b727f5229e98f579b01
Author: Robert Carr <racarr svn gnome org>
Date:   Tue May 26 14:56:45 2009 -0400

    libseed: seed_gobject_equals and the .equals() method has been useless since toggle refs were added in november, so remove it
---
 libseed/seed-engine.c       |   27 ---------------------------
 tests/javascript/compare.js |    4 ++--
 2 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/libseed/seed-engine.c b/libseed/seed-engine.c
index 5f34ecb..19f61dd 100644
--- a/libseed/seed-engine.c
+++ b/libseed/seed-engine.c
@@ -232,32 +232,6 @@ seed_gobject_constructor_invoked (JSContextRef ctx,
 }
 
 static JSValueRef
-seed_gobject_equals (JSContextRef ctx,
-		     JSObjectRef function,
-		     JSObjectRef this_object,
-		     size_t argumentCount,
-		     const JSValueRef arguments[], JSValueRef * exception)
-{
-  GObject *this, *that;
-
-  if (argumentCount != 1)
-    {
-      seed_make_exception (ctx, exception, "ArgumentError", 
-			   "GObject equals comparison expected"
-			   " 1 argument, got %zd", argumentCount);
-
-      return JSValueMakeNull (ctx);
-    }
-
-  this = seed_value_to_object (ctx, (JSValueRef) this_object, exception);
-  that = seed_value_to_object (ctx, arguments[0], exception);
-
-  if (this == that)
-    return seed_value_from_boolean (ctx, 1, 0);
-  return seed_value_from_boolean (ctx, 0, 0);
-}
-
-static JSValueRef
 seed_gobject_property_type (JSContextRef ctx,
 			    JSObjectRef function,
 			    JSObjectRef this_object,
@@ -998,7 +972,6 @@ seed_gobject_constructor_convert_to_type (JSContextRef ctx,
 }
 
 JSStaticFunction gobject_static_funcs[] = {
-  {"equals", seed_gobject_equals, 0},
   {"__debug_ref_count", seed_gobject_ref_count, 0},
   {"__property_type", seed_gobject_property_type, 0},
   {0, 0, 0}
diff --git a/tests/javascript/compare.js b/tests/javascript/compare.js
index 707e13a..8056fcd 100755
--- a/tests/javascript/compare.js
+++ b/tests/javascript/compare.js
@@ -11,5 +11,5 @@ var a = new Gtk.Button();
 var b = new Gtk.Button();
 var c = a;
 
-Seed.print(a.equals(b));
-Seed.print(a.equals(c));
+Seed.print(a == b);
+Seed.print(c == a);



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