summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mruby.h14
-rw-r--r--include/mruby/proc.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h
index 1ea0156e8..33af08133 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -113,6 +113,14 @@ struct mrb_context {
struct mrb_jmpbuf;
+typedef struct {
+ const char *filename;
+ int lineno;
+ struct RClass *klass;
+ const char *sep;
+ mrb_sym method_id;
+} mrb_backtrace_entry;
+
typedef void (*mrb_atexit_func)(struct mrb_state*);
typedef struct mrb_state {
@@ -125,6 +133,12 @@ typedef struct mrb_state {
struct mrb_context *root_c;
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;
diff --git a/include/mruby/proc.h b/include/mruby/proc.h
index 24f0f319f..5965a2b39 100644
--- a/include/mruby/proc.h
+++ b/include/mruby/proc.h
@@ -27,6 +27,8 @@ struct REnv {
#define MRB_ENV_UNSHARE_STACK(e) ((e)->cioff = -1)
#define MRB_ENV_STACK_SHARED_P(e) ((e)->cioff >= 0)
+MRB_API void mrb_env_unshare(mrb_state*, struct REnv*);
+
struct RProc {
MRB_OBJECT_HEADER;
union {