diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby.h | 3 | ||||
| -rw-r--r-- | include/mruby/error.h | 3 | ||||
| -rw-r--r-- | include/mruby/string.h | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/include/mruby.h b/include/mruby.h index 30c2dbbb1..4f404fb8e 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -374,6 +374,9 @@ mrb_value mrb_attr_get(mrb_state *mrb, mrb_value obj, mrb_sym id); mrb_bool mrb_respond_to(mrb_state *mrb, mrb_value obj, mrb_sym mid); mrb_bool mrb_obj_is_instance_of(mrb_state *mrb, mrb_value obj, struct RClass* c); +/* fiber functions (you need to link mruby-fiber mrbgem to use) */ +mrb_value mrb_fiber_yield(mrb_state *mrb, int argc, mrb_value *argv); + /* memory pool implementation */ typedef struct mrb_pool mrb_pool; struct mrb_pool* mrb_pool_open(mrb_state*); diff --git a/include/mruby/error.h b/include/mruby/error.h index b04dc1082..96c4092b5 100644 --- a/include/mruby/error.h +++ b/include/mruby/error.h @@ -13,5 +13,8 @@ mrb_value mrb_make_exception(mrb_state *mrb, int argc, mrb_value *argv); mrb_value mrb_format(mrb_state *mrb, const char *format, ...); void mrb_exc_print(mrb_state *mrb, struct RObject *exc); void mrb_longjmp(mrb_state *mrb); +void mrb_print_backtrace(mrb_state *mrb); +mrb_value mrb_exc_backtrace(mrb_state *mrb, mrb_value exc); +mrb_value mrb_get_backtrace(mrb_state *mrb); #endif /* MRUBY_ERROR_H */ diff --git a/include/mruby/string.h b/include/mruby/string.h index 675dadb5c..966f0bf77 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -53,7 +53,6 @@ char *mrb_string_value_ptr(mrb_state *mrb, mrb_value ptr); int mrb_str_offset(mrb_state *mrb, mrb_value str, int pos); mrb_value mrb_str_dup(mrb_state *mrb, mrb_value str); mrb_value mrb_str_intern(mrb_state *mrb, mrb_value self); -mrb_value mrb_str_cat_cstr(mrb_state *, mrb_value, const char *); mrb_value mrb_str_to_inum(mrb_state *mrb, mrb_value str, int base, mrb_bool badcheck); double mrb_str_to_dbl(mrb_state *mrb, mrb_value str, mrb_bool badcheck); mrb_value mrb_str_to_str(mrb_state *mrb, mrb_value str); @@ -63,6 +62,8 @@ mrb_value mrb_str_inspect(mrb_state *mrb, mrb_value str); mrb_bool mrb_str_equal(mrb_state *mrb, mrb_value str1, mrb_value str2); mrb_value mrb_str_dump(mrb_state *mrb, mrb_value str); mrb_value mrb_str_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len); +mrb_value mrb_str_cat_cstr(mrb_state *mrb, mrb_value str, const char *ptr); +#define mrb_str_cat_lit(mrb, str, lit) mrb_str_cat(mrb, str, (lit), sizeof(lit) - 1) mrb_value mrb_str_append(mrb_state *mrb, mrb_value str, mrb_value str2); int mrb_str_cmp(mrb_state *mrb, mrb_value str1, mrb_value str2); |
