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
83c5274a
Commit
83c5274a
authored
Mar 04, 2013
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #949 from mattn/find_symbol
Skip end of loop in mrb_sym2name_len
parents
f962068d
9d3a864a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
src/symbol.c
src/symbol.c
+7
-8
No files found.
src/symbol.c
View file @
83c5274a
...
...
@@ -81,16 +81,15 @@ mrb_sym2name_len(mrb_state *mrb, mrb_sym sym, int *lenp)
for
(
k
=
kh_begin
(
h
);
k
!=
kh_end
(
h
);
k
++
)
{
if
(
kh_exist
(
h
,
k
))
{
if
(
kh_value
(
h
,
k
)
==
sym
)
break
;
if
(
kh_value
(
h
,
k
)
==
sym
)
{
sname
=
kh_key
(
h
,
k
);
*
lenp
=
sname
.
len
;
return
sname
.
name
;
}
}
}
if
(
k
==
kh_end
(
h
))
{
*
lenp
=
0
;
return
NULL
;
/* missing */
}
sname
=
kh_key
(
h
,
k
);
*
lenp
=
sname
.
len
;
return
sname
.
name
;
*
lenp
=
0
;
return
NULL
;
/* missing */
}
void
...
...
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