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
b22bde65
Commit
b22bde65
authored
Jul 17, 2019
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid `MRB_INLINE` for `mrb_str_modify()`; ref #4579
Functions that are called infrequently need not to be inline.
parent
2add8641
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
include/mruby/string.h
include/mruby/string.h
+2
-7
src/string.c
src/string.c
+7
-0
No files found.
include/mruby/string.h
View file @
b22bde65
...
...
@@ -108,6 +108,8 @@ MRB_API mrb_int mrb_str_strlen(mrb_state*, struct RString*);
void
mrb_gc_free_str
(
mrb_state
*
,
struct
RString
*
);
MRB_API
void
mrb_str_modify
(
mrb_state
*
mrb
,
struct
RString
*
s
);
/* mrb_str_modify() with keeping ASCII flag if set */
MRB_API
void
mrb_str_modify_keep_ascii
(
mrb_state
*
mrb
,
struct
RString
*
s
);
/*
...
...
@@ -456,13 +458,6 @@ mrb_value mrb_str_inspect(mrb_state *mrb, mrb_value str);
mrb_bool
mrb_str_beg_len
(
mrb_int
str_len
,
mrb_int
*
begp
,
mrb_int
*
lenp
);
mrb_value
mrb_str_byte_subseq
(
mrb_state
*
mrb
,
mrb_value
str
,
mrb_int
beg
,
mrb_int
len
);
MRB_INLINE
void
mrb_str_modify
(
mrb_state
*
mrb
,
struct
RString
*
s
)
{
mrb_str_modify_keep_ascii
(
mrb
,
s
);
RSTR_UNSET_ASCII_FLAG
(
s
);
}
#ifdef MRB_UTF8_STRING
mrb_int
mrb_utf8_len
(
const
char
*
str
,
mrb_int
byte_len
);
#endif
...
...
src/string.c
View file @
b22bde65
...
...
@@ -770,6 +770,13 @@ mrb_str_modify_keep_ascii(mrb_state *mrb, struct RString *s)
}
}
MRB_API
void
mrb_str_modify
(
mrb_state
*
mrb
,
struct
RString
*
s
)
{
mrb_str_modify_keep_ascii
(
mrb
,
s
);
RSTR_UNSET_ASCII_FLAG
(
s
);
}
MRB_API
mrb_value
mrb_str_resize
(
mrb_state
*
mrb
,
mrb_value
str
,
mrb_int
len
)
{
...
...
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