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
cdd36c97
Commit
cdd36c97
authored
Oct 12, 2019
by
KOBAYASHI Shuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `str_make_shared()` to `str_share()` in `src/string.c`
Because it may not create `struct mrb_shared_string`.
parent
c310c8dc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/string.c
src/string.c
+3
-3
No files found.
src/string.c
View file @
cdd36c97
...
...
@@ -521,7 +521,7 @@ mrb_memsearch(const void *x0, mrb_int m, const void *y0, mrb_int n)
}
static
void
str_
make_shared
(
mrb_state
*
mrb
,
struct
RString
*
orig
,
struct
RString
*
s
)
str_
share
(
mrb_state
*
mrb
,
struct
RString
*
orig
,
struct
RString
*
s
)
{
size_t
len
=
(
size_t
)
orig
->
as
.
heap
.
len
;
...
...
@@ -585,7 +585,7 @@ mrb_str_byte_subseq(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len)
str_init_embed
(
s
,
RSTR_PTR
(
orig
)
+
beg
,
len
);
}
else
{
str_
make_shared
(
mrb
,
orig
,
s
);
str_
share
(
mrb
,
orig
,
s
);
s
->
as
.
heap
.
ptr
+=
beg
;
s
->
as
.
heap
.
len
=
len
;
}
...
...
@@ -691,7 +691,7 @@ str_replace(mrb_state *mrb, struct RString *s1, struct RString *s2)
str_init_embed
(
s1
,
RSTR_PTR
(
s2
),
len
);
}
else
{
str_
make_shared
(
mrb
,
s2
,
s1
);
str_
share
(
mrb
,
s2
,
s1
);
}
return
mrb_obj_value
(
s1
);
...
...
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