diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-24 12:19:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-24 12:19:23 +0000 |
commit | 4e41d5deddfeada60008cdedf0c69308e2886e9d (patch) | |
tree | 9235dcf6519c1db8fa058ce40ee7a8cc36a3a61f /time.c | |
parent | 65a884ebad541cadb711f47e5367b461a6428cb1 (diff) | |
download | ruby-4e41d5deddfeada60008cdedf0c69308e2886e9d.tar.gz |
time.c: remove debug code
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 43 |
1 files changed, 0 insertions, 43 deletions
@@ -53,41 +53,6 @@ eq(VALUE x, VALUE y) return RTEST(rb_funcall(x, id_eq, 1, y)); } -#ifdef _MSC_VER -static void * -value_insane_p(VALUE x) -{ - VALUE klass; - LPEXCEPTION_POINTERS info; - void *failed_address = 0; - if (SPECIAL_CONST_P(x)) return 0; - if (!&RBASIC_CLASS(x)) return (void *)x; - __try { - RB_GC_GUARD(klass) = RBASIC_CLASS(x); - } - __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? - (info = GetExceptionInformation(), EXCEPTION_EXECUTE_HANDLER) : - EXCEPTION_CONTINUE_SEARCH) { - PEXCEPTION_RECORD rec = info->ExceptionRecord; - failed_address = (void *)rec->ExceptionInformation[1]; - } - return failed_address; -} - -static void -inquire_value(VALUE x, const char *mesg) -{ - void *failed_address = value_insane_p(x); - if (failed_address) { - rb_fatal("Access violation at %p: class of %p: %s", - failed_address, (void *)x, mesg); - } -} -#else -# define value_insane_p(x) ((void)(x), 0) -# define inquire_value(x, mesg) (void)value_insane_p(x) -#endif - static int cmp(VALUE x, VALUE y) { @@ -98,8 +63,6 @@ cmp(VALUE x, VALUE y) return 1; return 0; } - inquire_value(x, "cmp(x)"); - inquire_value(y, "cmp(y)"); return rb_cmpint(rb_funcall(x, id_cmp, 1, y), x, y); } @@ -2618,12 +2581,6 @@ time_arg(int argc, VALUE *argv, struct vtm *vtm) vtm->sec = NIL_P(v[5])?0:obj2subsecx(v[5], &vtm->subsecx); } - if (value_insane_p(vtm->subsecx)) { - rb_fatal("argc=%d, sec=%"PRIsVALUE", subsec=%"PRIsVALUE", subsecx=%p", - argc, v[5], argc == 7 ? v[6] : Qnil, - &RBASIC_CLASS(vtm->subsecx)); - } - validate_vtm(vtm); RB_GC_GUARD(vtm->subsecx); } |