From 9644ad51b4a63d8db46d7918ec5e89a547236c56 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 23 May 2017 23:41:12 +0900 Subject: Simplify backtrace mechanism; fix #3633 #3634 #3644 Instead of preserving a backtrace in `mrb_state`, `mrb_exc_set` keeps packed backtrace in an exception object. `#backtrace` unpacks it to an array of strings. --- include/mruby.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'include/mruby.h') diff --git a/include/mruby.h b/include/mruby.h index 4e2e4ae41..29e8ddc79 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -152,12 +152,6 @@ struct mrb_context { struct mrb_jmpbuf; -typedef struct { - const char *filename; - int lineno; - mrb_sym method_id; -} mrb_backtrace_entry; - typedef void (*mrb_atexit_func)(struct mrb_state*); #define MRB_STATE_NO_REGEXP 1 @@ -172,15 +166,9 @@ typedef struct mrb_state { struct mrb_context *c; struct mrb_context *root_c; + struct iv_tbl *globals; /* global variable table */ struct RObject *exc; /* exception */ - struct { - struct RObject *exc; - int n; - int n_allocated; - mrb_backtrace_entry *entries; - } backtrace; - struct iv_tbl *globals; /* global variable table */ struct RObject *top_self; struct RClass *object_class; /* Object class */ -- cgit v1.2.3