You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/11/14 08:38:59 UTC

svn commit: r474687 - /incubator/tuscany/cpp/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp

Author: jsdelfino
Date: Mon Nov 13 23:38:58 2006
New Revision: 474687

URL: http://svn.apache.org/viewvc?view=rev&rev=474687
Log:
Minor cleanup, changed a C structure to a C++ class

Modified:
    incubator/tuscany/cpp/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp?view=diff&rev=474687&r1=474686&r2=474687
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ruby/src/tuscany/sca/ruby/RubyServiceWrapper.cpp Mon Nov 13 23:38:58 2006
@@ -42,20 +42,31 @@
 
 using commonj::sdo::PropertyList;
 
-extern "C"
+namespace tuscany
 {
-    
-    typedef struct _safe_rb_call
+    namespace sca
     {
-        VALUE instance;
-        ID method;
-        int argc;
-        const VALUE* argv;
-    } safe_rb_call;
+        namespace ruby
+        {
+            
+            class RubyServiceInvocation
+            {
+            public:
+                VALUE instance;
+                ID method;
+                int argc;
+                const VALUE* argv;
+            };
+        }
+    }
+}
 
+extern "C"
+{
+    
     static VALUE safe_rb_funcall(VALUE value)
     {
-        safe_rb_call* call = (safe_rb_call*)value;
+        tuscany::sca::ruby::RubyServiceInvocation* call = (tuscany::sca::ruby::RubyServiceInvocation*)value;
         if (call->argc == 0)
         {
             VALUE result = rb_funcall(call->instance, call->method, 0);
@@ -265,7 +276,7 @@
 
                     
                     // Invoke the specified method
-                    safe_rb_call call;
+                    RubyServiceInvocation call;
                     call.instance = instance;
                     call.method = method;
                     call.argc = n;



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org