mirror of https://github.com/odrling/Aegisub
Ruby: move to 1.9 version
Originally committed to SVN as r919.
This commit is contained in:
parent
5aaf235655
commit
b5ac82d5b2
|
@ -137,7 +137,7 @@ namespace Automation4 {
|
|||
rb_protect(rbLoadWrapper, rb_str_new2(t), &status);
|
||||
if(status > 0) // something bad happened (probably parsing error)
|
||||
{
|
||||
throw StringValueCStr(ruby_errinfo);
|
||||
//throw StringValueCStr(ruby_errinfo);
|
||||
}
|
||||
|
||||
VALUE global_var = rb_gv_get("$script_name");
|
||||
|
@ -564,7 +564,7 @@ namespace Automation4 {
|
|||
VALUE result;
|
||||
result = rb_protect(rbCallWrapper, reinterpret_cast<VALUE>(&arg), &error);
|
||||
if(error) {
|
||||
throw StringValueCStr(ruby_errinfo);
|
||||
//throw StringValueCStr(ruby_errinfo);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -350,7 +350,7 @@ namespace Automation4 {
|
|||
new_entry = reinterpret_cast<AssEntry*>(rb_protect(rb2AssWrapper, rbEntry, &status));
|
||||
--size;
|
||||
}while(status != 0); // broken lines at the beginning?
|
||||
ruby_errinfo = Qnil; // just in case
|
||||
rb_set_errinfo(Qnil);; // just in case
|
||||
|
||||
entryIter e = ass->Line.begin();
|
||||
if(new_entry->GetType() == ENTRY_DIALOGUE) // check if the first line is a dialogue
|
||||
|
@ -368,10 +368,14 @@ namespace Automation4 {
|
|||
rbEntry = rb_ary_shift(subtitles);
|
||||
new_entry = reinterpret_cast<AssEntry*>(rb_protect(rb2AssWrapper, rbEntry, &status));
|
||||
if(status == 0) ass->Line.push_back(new_entry);
|
||||
else {
|
||||
else
|
||||
{
|
||||
if(RubyProgressSink::inst)
|
||||
RubyProgressSink::inst->RubyDebugOut(1, &ruby_errinfo, Qnil);
|
||||
ruby_errinfo = Qnil; // clear the error
|
||||
{
|
||||
VALUE err = rb_errinfo();
|
||||
RubyProgressSink::inst->RubyDebugOut(1, &err, Qnil);
|
||||
}
|
||||
rb_set_errinfo(Qnil);
|
||||
}
|
||||
}
|
||||
RubyObjects::Get()->Unregister(subtitles);
|
||||
|
@ -418,10 +422,14 @@ namespace Automation4 {
|
|||
{
|
||||
VALUE res = rb_protect(rbAss2RbWrapper, reinterpret_cast<VALUE>(*entry), &status);
|
||||
if(status == 0) rb_ary_push(rbAssFile, res);
|
||||
else {
|
||||
else
|
||||
{
|
||||
if(RubyProgressSink::inst)
|
||||
RubyProgressSink::inst->RubyDebugOut(1, &ruby_errinfo, Qnil);
|
||||
ruby_errinfo = Qnil;
|
||||
{
|
||||
VALUE err = rb_errinfo();
|
||||
RubyProgressSink::inst->RubyDebugOut(1, &err, Qnil);
|
||||
}
|
||||
rb_set_errinfo(Qnil);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
//
|
||||
|
||||
#include "auto4_ruby.h"
|
||||
#include "../ruby/include/ruby.h"
|
||||
#include <ruby.h>
|
||||
#include <wx/window.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/gbsizer.h>
|
||||
|
|
Loading…
Reference in New Issue