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
31492a17
Commit
31492a17
authored
Jul 16, 2019
by
KOBAYASHI Shuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy receiver's `MRB_STR_ASCII` flag in some methods of `String`
parent
d9a65675
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
src/string.c
src/string.c
+3
-0
No files found.
src/string.c
View file @
31492a17
...
...
@@ -487,6 +487,7 @@ mrb_str_byte_subseq(mrb_state *mrb, mrb_value str, mrb_int beg, mrb_int len)
s
->
as
.
heap
.
ptr
+=
beg
;
s
->
as
.
heap
.
len
=
len
;
}
RSTR_COPY_ASCII_FLAG
(
s
,
orig
);
return
mrb_obj_value
(
s
);
}
...
...
@@ -902,6 +903,7 @@ mrb_str_times(mrb_state *mrb, mrb_value self)
memcpy
(
p
+
n
,
p
,
len
-
n
);
}
p
[
RSTR_LEN
(
str2
)]
=
'\0'
;
RSTR_COPY_ASCII_FLAG
(
str2
,
mrb_str_ptr
(
self
));
return
mrb_obj_value
(
str2
);
}
...
...
@@ -2837,6 +2839,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str)
}
}
mrb_str_cat_lit
(
mrb
,
result
,
"
\"
"
);
RSTR_COPY_ASCII_FLAG
(
mrb_str_ptr
(
result
),
mrb_str_ptr
(
str
));
return
result
;
}
...
...
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