FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mruby/include/mruby/proc.h at cpp_binding · gaffo/mruby · GitHub
gaffo
/
mruby
Public
forked from
mruby/mruby
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
mruby
/
include
/
mruby
/
proc.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
62 lines (50 loc) · 1.45 KB
Breadcrumbs
mruby
/
include
/
mruby
/
proc.h
Copy path
File metadata and controls
62 lines (50 loc) · 1.45 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
** mruby/proc.h - Proc class
**
** See Copyright Notice in mruby.h
*/
#ifndef
MRUBY_PROC_H
#define
MRUBY_PROC_H
#include
"mruby/irep.h"
#if
defined(
__cplusplus
)
extern
"C"
{
#endif
struct
REnv
{
MRB_OBJECT_HEADER
;
mrb_value
*
stack
;
mrb_sym
mid
;
int
cioff
;
};
struct
RProc
{
MRB_OBJECT_HEADER
;
union
{
mrb_irep
*
irep
;
mrb_func_t
func
;
}
body
;
struct
RClass
*
target_class
;
struct
REnv
*
env
;
};
/* aspec access */
#define
ARGS_GETREQ
(
a
) (((a) >> 19) & 0x1f)
#define
ARGS_GETOPT
(
a
) (((a) >> 14) & 0x1f)
#define
ARGS_GETREST
(
a
) ((a) & (1<<13))
#define
ARGS_GETPOST
(
a
) (((a) >> 8) & 0x1f)
#define
ARGS_GETKEY
(
a
) (((a) >> 3) & 0x1f))
#define
ARGS_GETKDICT
(
a
) ((a) & (1<<2))
#define
ARGS_GETBLOCK
(
a
) ((a) & (1<<1))
#define
MRB_PROC_CFUNC
128
#define
MRB_PROC_CFUNC_P
(
p
) ((p)->flags & MRB_PROC_CFUNC)
#define
MRB_PROC_STRICT
256
#define
MRB_PROC_STRICT_P
(
p
) ((p)->flags & MRB_PROC_STRICT)
#define
mrb_proc_ptr
(
v
) ((struct RProc*)((v).value.p))
struct
RProc
*
mrb_proc_new
(
mrb_state
*
,
mrb_irep
*
);
struct
RProc
*
mrb_proc_new_cfunc
(
mrb_state
*
,
mrb_func_t
);
struct
RProc
*
mrb_closure_new
(
mrb_state
*
,
mrb_irep
*
);
struct
RProc
*
mrb_closure_new_cfunc
(
mrb_state
*
mrb
,
mrb_func_t
func
,
int
nlocals
);
void
mrb_proc_copy
(
struct
RProc
*
a
,
struct
RProc
*
b
);
#include
"mruby/khash.h"
KHASH_DECLARE
(
mt
,
mrb_sym
,
struct
RProc
*
,
1
)
#if
defined(
__cplusplus
)
}
/* extern "C" { */
#endif
#endif
/* MRUBY_PROC_H */
Back
|
FazBrowse Home
|
New Git URL