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
56db3cf3
Commit
56db3cf3
authored
Nov 15, 2018
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify argument parsing; ref #4161
parent
f39f428e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
src/enum.c
src/enum.c
+1
-15
No files found.
src/enum.c
View file @
56db3cf3
...
...
@@ -14,22 +14,8 @@ enum_update_hash(mrb_state *mrb, mrb_value self)
mrb_int
hash
;
mrb_int
index
;
mrb_int
hv
;
mrb_value
item_hash
;
mrb_get_args
(
mrb
,
"iio"
,
&
hash
,
&
index
,
&
item_hash
);
if
(
mrb_fixnum_p
(
item_hash
))
{
hv
=
mrb_fixnum
(
item_hash
);
}
#ifndef MRB_WITHOUT_FLOAT
else
if
(
mrb_float_p
(
item_hash
))
{
hv
=
(
mrb_int
)
mrb_float
(
item_hash
);
}
#endif
else
{
mrb_raise
(
mrb
,
E_TYPE_ERROR
,
"can't calculate hash"
);
/* not reached */
hv
=
0
;
}
mrb_get_args
(
mrb
,
"iii"
,
&
hash
,
&
index
,
&
hv
);
hash
^=
((
uint32_t
)
hv
<<
(
index
%
16
));
return
mrb_fixnum_value
(
hash
);
...
...
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