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
21b8d20d
Commit
21b8d20d
authored
Mar 28, 2019
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed mistakes in
92dce053
* rename `sym2name` to `sym2name_len`. * `MRB_API` -> `static`
parent
5fe00c46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/symbol.c
src/symbol.c
+5
-5
No files found.
src/symbol.c
View file @
21b8d20d
...
...
@@ -236,8 +236,8 @@ mrb_check_intern_str(mrb_state *mrb, mrb_value str)
return
mrb_check_intern
(
mrb
,
RSTRING_PTR
(
str
),
RSTRING_LEN
(
str
));
}
MRB_API
const
char
*
sym2name
(
mrb_state
*
mrb
,
mrb_sym
sym
,
char
*
buf
,
mrb_int
*
lenp
)
static
const
char
*
sym2name
_len
(
mrb_state
*
mrb
,
mrb_sym
sym
,
char
*
buf
,
mrb_int
*
lenp
)
{
#ifndef MRB_ENABLE_ALL_SYMBOLS
if
(
sym
&
1
)
{
/* inline packed symbol */
...
...
@@ -258,7 +258,7 @@ sym2name(mrb_state *mrb, mrb_sym sym, char *buf, mrb_int *lenp)
MRB_API
const
char
*
mrb_sym2name_len
(
mrb_state
*
mrb
,
mrb_sym
sym
,
mrb_int
*
lenp
)
{
return
sym2name
(
mrb
,
sym
,
mrb
->
symbuf
,
lenp
);
return
sym2name
_len
(
mrb
,
sym
,
mrb
->
symbuf
,
lenp
);
}
void
...
...
@@ -552,8 +552,8 @@ sym_cmp(mrb_state *mrb, mrb_value s1)
mrb_int
len
,
len1
,
len2
;
char
buf1
[
8
],
buf2
[
8
];
p1
=
sym2name
(
mrb
,
sym1
,
buf1
,
&
len1
);
p2
=
sym2name
(
mrb
,
sym2
,
buf2
,
&
len2
);
p1
=
sym2name
_len
(
mrb
,
sym1
,
buf1
,
&
len1
);
p2
=
sym2name
_len
(
mrb
,
sym2
,
buf2
,
&
len2
);
len
=
lesser
(
len1
,
len2
);
retval
=
memcmp
(
p1
,
p2
,
len
);
if
(
retval
==
0
)
{
...
...
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