Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
4faaef43
Commit
4faaef43
authored
Apr 25, 2013
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename ARGS_GETXXX macros to avoid potential name conflict; close #1206
parent
30833220
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
include/mruby/proc.h
include/mruby/proc.h
+7
-7
src/proc.c
src/proc.c
+3
-3
No files found.
include/mruby/proc.h
View file @
4faaef43
...
@@ -31,13 +31,13 @@ struct RProc {
...
@@ -31,13 +31,13 @@ struct RProc {
};
};
/* aspec access */
/* aspec access */
#define
ARGS_GET
REQ(a) (((a) >> 19) & 0x1f)
#define
MRB_ARGS_
REQ(a) (((a) >> 19) & 0x1f)
#define
ARGS_GET
OPT(a) (((a) >> 14) & 0x1f)
#define
MRB_ARGS_
OPT(a) (((a) >> 14) & 0x1f)
#define
ARGS_GET
REST(a) ((a) & (1<<13))
#define
MRB_ARGS_
REST(a) ((a) & (1<<13))
#define
ARGS_GET
POST(a) (((a) >> 8) & 0x1f)
#define
MRB_ARGS_
POST(a) (((a) >> 8) & 0x1f)
#define
ARGS_GET
KEY(a) (((a) >> 3) & 0x1f))
#define
MRB_ARGS_
KEY(a) (((a) >> 3) & 0x1f))
#define
ARGS_GET
KDICT(a) ((a) & (1<<2))
#define
MRB_ARGS_
KDICT(a) ((a) & (1<<2))
#define
ARGS_GET
BLOCK(a) ((a) & (1<<1))
#define
MRB_ARGS_
BLOCK(a) ((a) & (1<<1))
#define MRB_PROC_CFUNC 128
#define MRB_PROC_CFUNC 128
#define MRB_PROC_CFUNC_P(p) ((p)->flags & MRB_PROC_CFUNC)
#define MRB_PROC_CFUNC_P(p) ((p)->flags & MRB_PROC_CFUNC)
...
...
src/proc.c
View file @
4faaef43
...
@@ -140,9 +140,9 @@ mrb_proc_arity(mrb_state *mrb, mrb_value self)
...
@@ -140,9 +140,9 @@ mrb_proc_arity(mrb_state *mrb, mrb_value self)
mrb_aspec
aspec
=
*
iseq
>>
6
;
mrb_aspec
aspec
=
*
iseq
>>
6
;
int
ma
,
ra
,
pa
,
arity
;
int
ma
,
ra
,
pa
,
arity
;
ma
=
ARGS_GET
REQ
(
aspec
);
ma
=
MRB_ARGS_
REQ
(
aspec
);
ra
=
ARGS_GET
REST
(
aspec
);
ra
=
MRB_ARGS_
REST
(
aspec
);
pa
=
ARGS_GET
POST
(
aspec
);
pa
=
MRB_ARGS_
POST
(
aspec
);
arity
=
ra
?
-
(
ma
+
pa
+
1
)
:
ma
+
pa
;
arity
=
ra
?
-
(
ma
+
pa
+
1
)
:
ma
+
pa
;
return
mrb_fixnum_value
(
arity
);
return
mrb_fixnum_value
(
arity
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment