[Kde-bindings] branches/KDE/4.5/kdebindings/ruby/qtruby

Richard Dale richard.j.dale at gmail.com
Tue Aug 17 19:06:10 UTC 2010


SVN commit 1164839 by rdale:

* Don't use rb_during_gc() to skip virtual method callbacks during virtual
  method callbacks as it's probably a bad idea and causes build problems
  with old ruby interpreters.

CCMAIL: kde-bindings at kde.org


 M  +6 -0      ChangeLog  
 M  +2 -3      src/Qt.cpp  


--- branches/KDE/4.5/kdebindings/ruby/qtruby/ChangeLog #1164838:1164839
@@ -1,3 +1,9 @@
+2010-08-17  Richard Dale  <richard.j.dale at gmail.com>
+
+    * Don't use rb_during_gc() to skip virtual method callbacks during virtual
+      method callbacks as it's probably a bad idea and causes build problems
+      with old ruby interpreters.
+
 2010-06-22  Richard Dale  <richard.j.dale at gmail.com>
 
     * Added snakecase versions of the methods in the Qt::DBusConnectionInterface
--- branches/KDE/4.5/kdebindings/ruby/qtruby/src/Qt.cpp #1164838:1164839
@@ -298,9 +298,8 @@
 	if (qstrncmp(methodName, "operator", sizeof("operator") - 1) == 0) {
 		methodName += (sizeof("operator") - 1);
 	}
-		// If the virtual method hasn't been overriden, just call the C++ one.
-		// During GC, avoid checking for override and just call the C++ version
-	if (rb_during_gc() || rb_respond_to(obj, rb_intern(methodName)) == 0) {
+
+    if (rb_respond_to(obj, rb_intern(methodName)) == 0) {
     	return false;
 	}
 	QtRuby::VirtualMethodCall c(smoke, method, args, obj, ALLOCA_N(VALUE, smoke->methods[method].numArgs));



More information about the Kde-bindings mailing list