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
94c5a5ee
Commit
94c5a5ee
authored
Feb 26, 2014
by
cubicdaiya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use mrb_str_new_lit instead of mrb_str_new for C string literals
parent
f3e9a066
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c
+1
-1
mrbgems/mruby-sprintf/src/sprintf.c
mrbgems/mruby-sprintf/src/sprintf.c
+1
-1
mrbgems/mruby-struct/src/struct.c
mrbgems/mruby-struct/src/struct.c
+1
-1
src/string.c
src/string.c
+1
-1
No files found.
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c
View file @
94c5a5ee
...
...
@@ -217,7 +217,7 @@ main(int argc, char **argv)
}
else
{
mrbc_filename
(
mrb
,
c
,
"-e"
);
mrb_gv_set
(
mrb
,
zero_sym
,
mrb_str_new
(
mrb
,
"-e"
,
2
));
mrb_gv_set
(
mrb
,
zero_sym
,
mrb_str_new
_lit
(
mrb
,
"-e"
));
v
=
mrb_load_string_cxt
(
mrb
,
args
.
cmdline
,
c
);
}
}
...
...
mrbgems/mruby-sprintf/src/sprintf.c
View file @
94c5a5ee
...
...
@@ -84,7 +84,7 @@ mrb_fix2binstr(mrb_state *mrb, mrb_value x, int base)
val
&=
0x3ff
;
if
(
val
==
0
)
{
return
mrb_str_new
(
mrb
,
"0"
,
1
);
return
mrb_str_new
_lit
(
mrb
,
"0"
);
}
*--
b
=
'\0'
;
do
{
...
...
mrbgems/mruby-struct/src/struct.c
View file @
94c5a5ee
...
...
@@ -442,7 +442,7 @@ static mrb_value
inspect_struct
(
mrb_state
*
mrb
,
mrb_value
s
,
int
recur
)
{
const
char
*
cn
=
mrb_class_name
(
mrb
,
mrb_obj_class
(
mrb
,
s
));
mrb_value
members
,
str
=
mrb_str_new
(
mrb
,
"#<struct "
,
9
);
mrb_value
members
,
str
=
mrb_str_new
_lit
(
mrb
,
"#<struct "
);
mrb_value
*
ptr
,
*
ptr_members
;
mrb_int
i
,
len
;
...
...
src/string.c
View file @
94c5a5ee
...
...
@@ -2406,7 +2406,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str)
{
const
char
*
p
,
*
pend
;
char
buf
[
CHAR_ESC_LEN
+
1
];
mrb_value
result
=
mrb_str_new
(
mrb
,
"
\"
"
,
1
);
mrb_value
result
=
mrb_str_new
_lit
(
mrb
,
"
\"
"
);
p
=
RSTRING_PTR
(
str
);
pend
=
RSTRING_END
(
str
);
for
(;
p
<
pend
;
p
++
)
{
...
...
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