summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mruby.h')
-rw-r--r--include/mruby.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/include/mruby.h b/include/mruby.h
index 93fc0f010..2d30d3d27 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -93,7 +93,7 @@
*/
MRB_BEGIN_DECL
-typedef uint32_t mrb_code;
+typedef uint8_t mrb_code;
/**
* Required arguments signature type.
@@ -123,8 +123,8 @@ typedef struct {
mrb_sym mid;
struct RProc *proc;
mrb_value *stackent;
- int ridx;
- int epos;
+ uint16_t ridx;
+ uint16_t epos;
struct REnv *env;
mrb_code *pc; /* return address */
mrb_code *err; /* error position */
@@ -151,10 +151,10 @@ struct mrb_context {
mrb_callinfo *ci;
mrb_callinfo *cibase, *ciend;
- mrb_code **rescue; /* exception handler stack */
- int rsize;
+ uint16_t *rescue; /* exception handler stack */
+ uint16_t rsize;
struct RProc **ensure; /* ensure handler stack */
- int esize, eidx;
+ uint16_t esize, eidx;
enum mrb_fiber_state status;
mrb_bool vmexec;
@@ -485,9 +485,10 @@ MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_
* }
* @param [mrb_state*] mrb_state* The mruby state reference.
* @param [struct RClass*] RClass* A class the method will be undefined from.
- * @param [const char*] constchar* The name of the method to be undefined.
+ * @param [const char] const char* The name of the method to be undefined.
*/
MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*);
+MRB_API void mrb_undef_method_id(mrb_state*, struct RClass*, mrb_sym);
/**
* Undefine a class method.
@@ -782,7 +783,7 @@ MRB_API struct RClass * mrb_define_module_under(mrb_state *mrb, struct RClass *o
#define MRB_ARGS_REQ(n) ((mrb_aspec)((n)&0x1f) << 18)
/**
- * Funtion takes n optional arguments
+ * Function takes n optional arguments
*
* @param n
* The number of optional arguments.
@@ -790,7 +791,7 @@ MRB_API struct RClass * mrb_define_module_under(mrb_state *mrb, struct RClass *o
#define MRB_ARGS_OPT(n) ((mrb_aspec)((n)&0x1f) << 13)
/**
- * Funtion takes n1 mandatory arguments and n2 optional arguments
+ * Function takes n1 mandatory arguments and n2 optional arguments
*
* @param n1
* The number of required arguments.
@@ -1196,7 +1197,7 @@ typedef enum call_type {
CALL_TYPE_MAX
} call_type;
-MRB_API void mrb_define_alias(mrb_state *mrb, struct RClass *klass, const char *name1, const char *name2);
+MRB_API void mrb_define_alias(mrb_state *mrb, struct RClass *c, const char *a, const char *b);
MRB_API const char *mrb_class_name(mrb_state *mrb, struct RClass* klass);
MRB_API void mrb_define_global_const(mrb_state *mrb, const char *name, mrb_value val);
@@ -1234,7 +1235,7 @@ MRB_API mrb_value mrb_fiber_alive_p(mrb_state *mrb, mrb_value fib);
* @mrbgem mruby-fiber
*/
#define E_FIBER_ERROR (mrb_exc_get(mrb, "FiberError"))
-MRB_API void mrb_stack_extend(mrb_state*, int);
+MRB_API void mrb_stack_extend(mrb_state*, mrb_int);
/* memory pool implementation */
typedef struct mrb_pool mrb_pool;