Header: mruby/proc.h

Overview

Proc class

Function Summary collapse

Define Summary

#define MRUBY_PROC_H
#define MRB_ENV_SET_STACK_LEN

flags (21bits): 1(shared flag):10(cioff/bidx):10(stack_len)

#define MRB_ENV_STACK_LEN
#define MRB_ENV_STACK_UNSHARED
#define MRB_ENV_UNSHARE_STACK
#define MRB_ENV_STACK_SHARED_P
#define MRB_ENV_BIDX
#define MRB_ENV_SET_BIDX
#define MRB_ASPEC_REQ

aspec access

#define MRB_ASPEC_OPT
#define MRB_ASPEC_REST
#define MRB_ASPEC_POST
#define MRB_ASPEC_KEY
#define MRB_ASPEC_KDICT
#define MRB_ASPEC_BLOCK
#define MRB_PROC_CFUNC_FL
#define MRB_PROC_CFUNC_P
#define MRB_PROC_CFUNC
#define MRB_PROC_STRICT
#define MRB_PROC_STRICT_P
#define MRB_PROC_ORPHAN
#define MRB_PROC_ORPHAN_P
#define MRB_PROC_ENVSET
#define MRB_PROC_ENV_P
#define MRB_PROC_ENV
#define MRB_PROC_TARGET_CLASS
#define MRB_PROC_SET_TARGET_CLASS
#define MRB_PROC_SCOPE
#define MRB_PROC_SCOPE_P
#define mrb_proc_ptr
#define mrb_cfunc_env_get

old name

#define MRB_METHOD_FUNC_FL
#define MRB_METHOD_NOARG_FL
#define MRB_METHOD_FUNC_P
#define MRB_METHOD_NOARG_P
#define MRB_METHOD_NOARG_SET
#define MRB_METHOD_FUNC
#define MRB_METHOD_FROM_FUNC
#define MRB_METHOD_FROM_PROC
#define MRB_METHOD_PROC_P
#define MRB_METHOD_PROC
#define MRB_METHOD_UNDEF_P
#define MRB_METHOD_CFUNC_P
#define MRB_METHOD_CFUNC

Function Details

struct RProc * mrb_proc_new_cfunc(mrb_state* , mrb_func_t )

struct RProc * mrb_closure_new_cfunc(mrb_state * mrb, mrb_func_t func, int nlocals)

struct RProc * mrb_proc_new_cfunc_with_env(mrb_state * mrb, mrb_func_t func, mrb_int argc, const mrb_value * argv)

following functions are defined in mruby-proc-ext so please include it when using

mrb_value mrb_proc_cfunc_env_get(mrb_state * mrb, mrb_int idx)