summaryrefslogtreecommitdiff
path: root/source/kde/kdebindings/kdebindings-ruby-env.h.diff
blob: 61f404c7095d0f3322619bbb6acb82670f4bc33b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
--- kdebindings-r1016551/ruby/krossruby/rubyextension.cpp.org	2009-08-26 07:50:12.000000000 -0600
+++ kdebindings-r1016551/ruby/krossruby/rubyextension.cpp	2009-08-29 05:59:57.705834017 -0600
@@ -278,7 +278,7 @@
             sendersignal = RubyType<QByteArray>::toVariant(argv[1]);
             idx = 2;
             if( argc <= idx ) {
-                rb_raise(rb_eTypeError, ::QString("Expected at least %1 arguments.").arg(idx+1).toLatin1().constData());
+                /*rb_raise(rb_eTypeError, ::QString("Expected at least %1 arguments.").arg(idx+1).toLatin1().constData());*/
                 return Qfalse;
             }
         } break;
@@ -310,7 +310,7 @@
         */
 #if(!(RUBY_VERSION_MAJOR==1 && RUBY_VERSION_MINOR==8 && RUBY_VERSION_TEENY==4))
         else {
-            rb_raise(rb_eTypeError, ::QString("The argument number %1 is invalid.").arg(idx).toLatin1().constData());
+            /*rb_raise(rb_eTypeError, ::QString("The argument number %1 is invalid.").arg(idx).toLatin1().constData());*/
             return Qfalse;
         }
 #endif
--- kdebindings-r1016551/ruby/krossruby/rubyfunction.h.org	2009-08-26 07:50:12.000000000 -0600
+++ kdebindings-r1016551/ruby/krossruby/rubyfunction.h	2009-08-29 06:27:56.393849016 -0600
@@ -198,7 +198,7 @@
                             //VALUE result = rb_funcall2(m_method, rb_intern("call"), argsize, args);
 
                             //TODO optimize
-                            ruby_in_eval++;
+                            /*ruby_in_eval++;
                             VALUE argarray = rb_ary_new2(3);
                             rb_ary_store(argarray, 0, m_method); //self
                             rb_ary_store(argarray, 1, INT2FIX(argsize));
@@ -207,7 +207,7 @@
                             ruby_in_eval--;
 
                             // finally set the returnvalue
-                            m_tmpResult = RubyType<QVariant>::toVariant(result);
+                            m_tmpResult = RubyType<QVariant>::toVariant(result);*/
                             #ifdef KROSS_RUBY_FUNCTION_DEBUG
                                 QObject* sender = QObject::sender();
                                 krossdebug( QString("RubyFunction::qt_metacall sender.objectName=%1 sender.className=%2 result=%3 variantresult=%4").arg(sender->objectName()).arg(sender->metaObject()->className()).arg(STR2CSTR(rb_inspect(result))).arg(m_tmpResult.toString()) );
--- kdebindings-r1016551/ruby/krossruby/rubyobject.cpp.org	2009-08-28 04:05:33.356632000 -0600
+++ kdebindings-r1016551/ruby/krossruby/rubyobject.cpp	2009-08-29 05:22:50.886344151 -0600
@@ -52,7 +52,7 @@
         }
     }
 
-    ruby_nerrs++;
+    /*ruby_nerrs++;*/
 /*
     VALUE rubyscriptvalue = rb_funcall(self, rb_intern("const_get"), 1, ID2SYM(rb_intern("RUBYSCRIPTOBJ")));
     RubyScript* rubyscript;
--- kdebindings-r1016551/ruby/krossruby/rubyscript.cpp.org	2009-08-28 04:05:33.360633000 -0600
+++ kdebindings-r1016551/ruby/krossruby/rubyscript.cpp	2009-08-29 05:21:52.226333617 -0600
@@ -65,7 +65,7 @@
         }
     }
 
-    ruby_nerrs++;
+/*    ruby_nerrs++;*/
 
     VALUE rubyscriptvalue = rb_funcall(self, rb_intern("const_get"), 1, ID2SYM(rb_intern("RUBYSCRIPTOBJ")));
     RubyScript* rubyscript;
@@ -173,11 +173,11 @@
             // needed to prevent infinitive loops ifour scripting call uses e.g. callFunction
             m_hasBeenSuccessFullyExecuted = true;
 
-            const int critical = rb_thread_critical;
-            rb_thread_critical = Qtrue;
+            /*const int critical = rb_thread_critical;*/
+            /*rb_thread_critical = Qtrue;
 
             ruby_nerrs = 0;
-            ruby_errinfo = Qnil;
+            ruby_errinfo = Qnil;*/
 
             VALUE args = rb_ary_new2(3);
             rb_ary_store(args, 0, m_script); //self
@@ -192,24 +192,24 @@
             }
             */
 
-            ruby_in_eval++;
+            /*ruby_in_eval++;*/
             VALUE result = rb_rescue2((VALUE(*)(...))callExecute, args, (VALUE(*)(...))callExecuteException, m_script, rb_eException, 0);
-            ruby_in_eval--;
+            /*ruby_in_eval--;*/
 
-            if (ruby_nerrs != 0) {
+            /*if (ruby_nerrs != 0) {
                 //#ifdef KROSS_RUBY_SCRIPT_EXECUTE_DEBUG
                     krossdebug( QString("Compilation has failed. errorMessage=%1 errorTrace=\n%2\n").arg(q->errorMessage()).arg(q->errorTrace()) );
                 //#endif
                 m_hasBeenSuccessFullyExecuted = false;
             } else {
                 m_hasBeenSuccessFullyExecuted = true;
-            }
+            }*/
 
             #ifdef KROSS_RUBY_EXPLICIT_GC
                 rb_gc();
             #endif
 
-            rb_thread_critical = critical;
+            /*rb_thread_critical = critical;*/
             return result;
         }
 
@@ -371,9 +371,9 @@
         krossdebug( QString("RubyScript::callFunction() name=%1").arg(name) );
     #endif
 
-    const int critical = rb_thread_critical;
+    /*const int critical = rb_thread_critical;
     rb_thread_critical = Qtrue;
-    ruby_in_eval++;
+    ruby_in_eval++;*/
     //ruby_current_node
 
     if( ! d->m_hasBeenSuccessFullyExecuted ) {
@@ -383,7 +383,7 @@
         #ifdef KROSS_RUBY_SCRIPT_CALLFUNCTION_DEBUG
             krossdebug("RubyScript::callFunction failed");
         #endif
-        setError( QString("Failed to call function \"%1\": %2").arg(name).arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )) ); // TODO: get the error
+        /*setError( QString("Failed to call function \"%1\": %2").arg(name).arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )) ); // TODO: get the error*/
     }
     else {
         //VALUE self = rb_eval_string("self");
@@ -413,8 +413,8 @@
 //         rb_gc(); // This one is plainly wrong, since there is a good deal of chance that it will delete the content of result before it is used
     #endif
 
-    ruby_in_eval--;
-    rb_thread_critical = critical;
+    /*ruby_in_eval--;
+    rb_thread_critical = critical;*/
 
     return result;
 }