Author: mvidner
Date: Mon Oct 3 17:23:29 2011
New Revision: 66201
URL: http://svn.opensuse.org/viewcvs/yast?rev=66201&view=rev
Log:
Removed some exception logic, as it is no longer raised.
This reverts commit 419482f6631963305142c8cbc1a4da2bb03a5abe.
"Don't raise a Ruby exception when returning to YCP (->segv). Log and return nil."
Modified:
trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.cc
trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.h
trunk/ruby-bindings/src/ruby/YRuby.cc
Modified: trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.cc?rev=66201&r1=66200&r2=66201&view=diff
==============================================================================
--- trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.cc (original)
+++ trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.cc Mon Oct 3 17:23:29 2011
@@ -46,8 +46,6 @@
#include
#include
-#include
-
#include "Y2RubyTypePath.h"
#include "Y2RubyTypeTerm.h"
@@ -203,7 +201,7 @@
*/
YCPValue
-rbvalue_2_ycpvalue( VALUE value, ConversionFlags flags )
+rbvalue_2_ycpvalue( VALUE value )
{
//VALUE klass = rb_funcall( value, rb_intern("class"), 0);
//std::cout << StringValuePtr( rb_funcall( klass, rb_intern("to_s"), 0)) << " | " << StringValuePtr(rb_funcall( value, rb_intern("inspect"), 0)) << std::endl;
@@ -250,15 +248,6 @@
}
return rbobject_2_ycpexternal(value);
- /*
- string msg = stringutil::form("Conversion of Ruby type %s not supported", class_name);
- if (flags & DONT_RAISE) {
- y2error("%s", msg.c_str());
- } else {
- rb_raise(rb_eTypeError, msg.c_str());
- }
- return YCPVoid();
- */
}
}
}
Modified: trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.h?rev=66201&r1=66200&r2=66201&view=diff
==============================================================================
--- trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.h (original)
+++ trunk/ruby-bindings/src/ruby/Y2RubyTypeConv.h Mon Oct 3 17:23:29 2011
@@ -32,17 +32,12 @@
extern "C" VALUE
ycpvalue_2_rbvalue( YCPValue ycpval );
-enum ConversionFlags {
- NONE,
- DONT_RAISE,
-};
-
/**
* Converts a Ruby Value into a YCPValue
* Supports neested lists and maps using recursion.
*/
YCPValue
-rbvalue_2_ycpvalue( VALUE value, ConversionFlags flags = NONE);
+rbvalue_2_ycpvalue( VALUE value );
/**
Modified: trunk/ruby-bindings/src/ruby/YRuby.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/src/ruby/YRuby.cc?rev=66201&r1=66200&r2=66201&view=diff
==============================================================================
--- trunk/ruby-bindings/src/ruby/YRuby.cc (original)
+++ trunk/ruby-bindings/src/ruby/YRuby.cc Mon Oct 3 17:23:29 2011
@@ -222,6 +222,6 @@
//VALUE result = rb_funcall( module, rb_intern(function.c_str()), 2, INT2NUM(2), INT2NUM(3) );
y2milestone( "Called function '%s' in module '%s'", function.c_str(), module_name.c_str());
}
- return rbvalue_2_ycpvalue(result, DONT_RAISE);
+ return rbvalue_2_ycpvalue(result);
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org