search for: exception_oth

Displaying 2 results from an estimated 2 matches for "exception_oth".

Did you mean: exception_on
2017 Feb 02
0
[nbdkit PATCH 2/2] ruby: Support zero callback
...uncall2 (Qnil, rb_intern ("zero"), 4, argv); + if (last_error == EOPNOTSUPP || + exception_happened == EXCEPTION_NO_METHOD_ERROR) { + nbdkit_debug ("zero falling back to pwrite"); + nbdkit_set_error (EOPNOTSUPP); + return -1; + } + else if (exception_happened == EXCEPTION_OTHER) + return -1; + + return 0; +} + +static int plugin_rb_can_write (void *handle) { volatile VALUE argv[1]; @@ -483,6 +510,7 @@ static struct nbdkit_plugin plugin = { .pwrite = plugin_rb_pwrite, .flush = plugin_rb_flush, .trim = plugin_rb_trim,...
2017 Feb 02
3
[nbdkit PATCH 0/2] Ruby bindings for .zero
Similar to python and perl. But MUCH easier (especially considering that this is the first time I've every tried to run Ruby). I even had fun making set_error() polymorphic. Eric Blake (2): ruby: Expose nbdkit_set_error to ruby script ruby: Support zero callback plugins/ruby/example.rb | 11 ++++++++ plugins/ruby/nbdkit-ruby-plugin.pod | 54