mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/tk/tcltklib.c : fix to compile on YARV
ruby_errinfo -> rb_errinfo(), ruby_safe_level -> rb_safe_level(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
939357f0d8
commit
e7a993656c
2 changed files with 47 additions and 41 deletions
|
@ -1,6 +1,12 @@
|
||||||
|
Mon Jan 01 08:07:06 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* ext/tk/tcltklib.c : fix to compile on YARV
|
||||||
|
ruby_errinfo -> rb_errinfo(),
|
||||||
|
ruby_safe_level -> rb_safe_level().
|
||||||
|
|
||||||
Mon Jan 01 07:57:17 2007 Koichi Sasada <ko1@atdot.net>
|
Mon Jan 01 07:57:17 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* test/drb/test_drbssl.rb : fix to skip drb tests
|
* test/drb/test_drbssl.rb : fix to skip drb tests.
|
||||||
|
|
||||||
Mon Jan 1 06:13:11 2007 Eric Hodel <drbrain@segment7.net>
|
Mon Jan 1 06:13:11 2007 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
|
|
@ -1345,11 +1345,11 @@ lib_eventloop_core(check_root, update_flag, check_var, interp)
|
||||||
if (status) {
|
if (status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case TAG_RAISE:
|
case TAG_RAISE:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rbtk_pending_exception
|
rbtk_pending_exception
|
||||||
= rb_exc_new2(rb_eException, "unknown exception");
|
= rb_exc_new2(rb_eException, "unknown exception");
|
||||||
} else {
|
} else {
|
||||||
rbtk_pending_exception = ruby_errinfo;
|
rbtk_pending_exception = rb_errinfo();
|
||||||
|
|
||||||
if (!NIL_P(rbtk_pending_exception)) {
|
if (!NIL_P(rbtk_pending_exception)) {
|
||||||
if (rbtk_eventloop_depth == 0) {
|
if (rbtk_eventloop_depth == 0) {
|
||||||
|
@ -1364,10 +1364,10 @@ lib_eventloop_core(check_root, update_flag, check_var, interp)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_FATAL:
|
case TAG_FATAL:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
|
rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
|
||||||
} else {
|
} else {
|
||||||
rb_exc_raise(ruby_errinfo);
|
rb_exc_raise(rb_errinfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1465,12 +1465,12 @@ lib_eventloop_core(check_root, update_flag, check_var, interp)
|
||||||
if (status) {
|
if (status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case TAG_RAISE:
|
case TAG_RAISE:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rbtk_pending_exception
|
rbtk_pending_exception
|
||||||
= rb_exc_new2(rb_eException,
|
= rb_exc_new2(rb_eException,
|
||||||
"unknown exception");
|
"unknown exception");
|
||||||
} else {
|
} else {
|
||||||
rbtk_pending_exception = ruby_errinfo;
|
rbtk_pending_exception = rb_errinfo();
|
||||||
|
|
||||||
if (!NIL_P(rbtk_pending_exception)) {
|
if (!NIL_P(rbtk_pending_exception)) {
|
||||||
if (rbtk_eventloop_depth == 0) {
|
if (rbtk_eventloop_depth == 0) {
|
||||||
|
@ -1485,10 +1485,10 @@ lib_eventloop_core(check_root, update_flag, check_var, interp)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_FATAL:
|
case TAG_FATAL:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
|
rb_exc_raise(rb_exc_new2(rb_eFatal, "FATAL"));
|
||||||
} else {
|
} else {
|
||||||
rb_exc_raise(ruby_errinfo);
|
rb_exc_raise(rb_errinfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1537,12 +1537,12 @@ lib_eventloop_core(check_root, update_flag, check_var, interp)
|
||||||
if (status) {
|
if (status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case TAG_RAISE:
|
case TAG_RAISE:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rbtk_pending_exception
|
rbtk_pending_exception
|
||||||
= rb_exc_new2(rb_eException,
|
= rb_exc_new2(rb_eException,
|
||||||
"unknown exception");
|
"unknown exception");
|
||||||
} else {
|
} else {
|
||||||
rbtk_pending_exception = ruby_errinfo;
|
rbtk_pending_exception = rb_errinfo();
|
||||||
|
|
||||||
if (!NIL_P(rbtk_pending_exception)) {
|
if (!NIL_P(rbtk_pending_exception)) {
|
||||||
if (rbtk_eventloop_depth == 0) {
|
if (rbtk_eventloop_depth == 0) {
|
||||||
|
@ -1557,11 +1557,11 @@ lib_eventloop_core(check_root, update_flag, check_var, interp)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_FATAL:
|
case TAG_FATAL:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rb_exc_raise(rb_exc_new2(rb_eFatal,
|
rb_exc_raise(rb_exc_new2(rb_eFatal,
|
||||||
"FATAL"));
|
"FATAL"));
|
||||||
} else {
|
} else {
|
||||||
rb_exc_raise(ruby_errinfo);
|
rb_exc_raise(rb_errinfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1618,7 +1618,7 @@ lib_eventloop_core(check_root, update_flag, check_var, interp)
|
||||||
}
|
}
|
||||||
|
|
||||||
DUMP1("trap check & thread scheduling");
|
DUMP1("trap check & thread scheduling");
|
||||||
if (update_flag == 0) CHECK_INTS;
|
if (update_flag == 0) ; // TODO: CHECK_INTS
|
||||||
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1665,19 +1665,19 @@ lib_eventloop_main(args)
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case TAG_RAISE:
|
case TAG_RAISE:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rbtk_pending_exception
|
rbtk_pending_exception
|
||||||
= rb_exc_new2(rb_eException, "unknown exception");
|
= rb_exc_new2(rb_eException, "unknown exception");
|
||||||
} else {
|
} else {
|
||||||
rbtk_pending_exception = ruby_errinfo;
|
rbtk_pending_exception = rb_errinfo();
|
||||||
}
|
}
|
||||||
return Qnil;
|
return Qnil;
|
||||||
|
|
||||||
case TAG_FATAL:
|
case TAG_FATAL:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
|
rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
|
||||||
} else {
|
} else {
|
||||||
rbtk_pending_exception = ruby_errinfo;
|
rbtk_pending_exception = rb_errinfo();
|
||||||
}
|
}
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
@ -2030,9 +2030,9 @@ lib_thread_callback(argc, argv, self)
|
||||||
free(q);
|
free(q);
|
||||||
|
|
||||||
if (NIL_P(rbtk_pending_exception)) {
|
if (NIL_P(rbtk_pending_exception)) {
|
||||||
/* return ruby_errinfo; */
|
/* return rb_errinfo(); */
|
||||||
if (status) {
|
if (status) {
|
||||||
rb_exc_raise(ruby_errinfo);
|
rb_exc_raise(rb_errinfo());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
VALUE exc = rbtk_pending_exception;
|
VALUE exc = rbtk_pending_exception;
|
||||||
|
@ -2238,50 +2238,50 @@ tcl_protect_core(interp, proc, data) /* should not raise exception */
|
||||||
goto error;
|
goto error;
|
||||||
error:
|
error:
|
||||||
str = rb_str_new2("LocalJumpError: ");
|
str = rb_str_new2("LocalJumpError: ");
|
||||||
rb_str_append(str, rb_obj_as_string(ruby_errinfo));
|
rb_str_append(str, rb_obj_as_string(rb_errinfo()));
|
||||||
exc = rb_exc_new3(type, str);
|
exc = rb_exc_new3(type, str);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_RETRY:
|
case TAG_RETRY:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
DUMP1("rb_protect: retry");
|
DUMP1("rb_protect: retry");
|
||||||
exc = rb_exc_new2(eTkCallbackRetry, "retry jump error");
|
exc = rb_exc_new2(eTkCallbackRetry, "retry jump error");
|
||||||
} else {
|
} else {
|
||||||
exc = ruby_errinfo;
|
exc = rb_errinfo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_REDO:
|
case TAG_REDO:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
DUMP1("rb_protect: redo");
|
DUMP1("rb_protect: redo");
|
||||||
exc = rb_exc_new2(eTkCallbackRedo, "redo jump error");
|
exc = rb_exc_new2(eTkCallbackRedo, "redo jump error");
|
||||||
} else {
|
} else {
|
||||||
exc = ruby_errinfo;
|
exc = rb_errinfo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_RAISE:
|
case TAG_RAISE:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
exc = rb_exc_new2(rb_eException, "unknown exception");
|
exc = rb_exc_new2(rb_eException, "unknown exception");
|
||||||
} else {
|
} else {
|
||||||
exc = ruby_errinfo;
|
exc = rb_errinfo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_FATAL:
|
case TAG_FATAL:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
exc = rb_exc_new2(rb_eFatal, "FATAL");
|
exc = rb_exc_new2(rb_eFatal, "FATAL");
|
||||||
} else {
|
} else {
|
||||||
exc = ruby_errinfo;
|
exc = rb_errinfo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_THROW:
|
case TAG_THROW:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
DUMP1("rb_protect: throw");
|
DUMP1("rb_protect: throw");
|
||||||
exc = rb_exc_new2(eTkCallbackThrow, "throw jump error");
|
exc = rb_exc_new2(eTkCallbackThrow, "throw jump error");
|
||||||
} else {
|
} else {
|
||||||
exc = ruby_errinfo;
|
exc = rb_errinfo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -4746,10 +4746,10 @@ ip_init(argc, argv, self)
|
||||||
Tk_Window mainWin = (Tk_Window)NULL;
|
Tk_Window mainWin = (Tk_Window)NULL;
|
||||||
|
|
||||||
/* security check */
|
/* security check */
|
||||||
if (ruby_safe_level >= 4) {
|
if (rb_safe_level() >= 4) {
|
||||||
rb_raise(rb_eSecurityError,
|
rb_raise(rb_eSecurityError,
|
||||||
"Cannot create a TclTkIp object at level %d",
|
"Cannot create a TclTkIp object at level %d",
|
||||||
ruby_safe_level);
|
rb_safe_level());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create object */
|
/* create object */
|
||||||
|
@ -5696,19 +5696,19 @@ ip_eval_real(self, cmd_str, cmd_len)
|
||||||
ret = rb_protect(call_tcl_eval, (VALUE)&inf, &status);
|
ret = rb_protect(call_tcl_eval, (VALUE)&inf, &status);
|
||||||
switch(status) {
|
switch(status) {
|
||||||
case TAG_RAISE:
|
case TAG_RAISE:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rbtk_pending_exception = rb_exc_new2(rb_eException,
|
rbtk_pending_exception = rb_exc_new2(rb_eException,
|
||||||
"unknown exception");
|
"unknown exception");
|
||||||
} else {
|
} else {
|
||||||
rbtk_pending_exception = ruby_errinfo;
|
rbtk_pending_exception = rb_errinfo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_FATAL:
|
case TAG_FATAL:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
|
rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
|
||||||
} else {
|
} else {
|
||||||
rbtk_pending_exception = ruby_errinfo;
|
rbtk_pending_exception = rb_errinfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -6661,19 +6661,19 @@ ip_invoke_core(interp, argc, argv)
|
||||||
ret = rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
|
ret = rb_protect(invoke_tcl_proc, (VALUE)&inf, &status);
|
||||||
switch(status) {
|
switch(status) {
|
||||||
case TAG_RAISE:
|
case TAG_RAISE:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rbtk_pending_exception = rb_exc_new2(rb_eException,
|
rbtk_pending_exception = rb_exc_new2(rb_eException,
|
||||||
"unknown exception");
|
"unknown exception");
|
||||||
} else {
|
} else {
|
||||||
rbtk_pending_exception = ruby_errinfo;
|
rbtk_pending_exception = rb_errinfo();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TAG_FATAL:
|
case TAG_FATAL:
|
||||||
if (NIL_P(ruby_errinfo)) {
|
if (NIL_P(rb_errinfo())) {
|
||||||
rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
|
rbtk_pending_exception = rb_exc_new2(rb_eFatal, "FATAL");
|
||||||
} else {
|
} else {
|
||||||
rbtk_pending_exception = ruby_errinfo;
|
rbtk_pending_exception = rb_errinfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue