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
db96db6a
Commit
db96db6a
authored
May 09, 2012
by
Yukihiro Matsumoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move declaration in the middle
parent
da9e8ceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
src/transcode.c
src/transcode.c
+7
-9
No files found.
src/transcode.c
View file @
db96db6a
...
@@ -2694,14 +2694,10 @@ str_encode_bang(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value str)
...
@@ -2694,14 +2694,10 @@ str_encode_bang(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value str)
{
{
mrb_value
argv
[
16
];
mrb_value
argv
[
16
];
int
argc
;
int
argc
;
mrb_get_args
(
mrb
,
"*"
,
&
argv
,
&
argc
);
mrb_value
newstr
;
mrb_value
newstr
;
int
encidx
;
int
encidx
;
//if (OBJ_FROZEN(str)) { /* in future, may use str_frozen_check from string.c, but that's currently static */
mrb_get_args
(
mrb
,
"*"
,
&
argv
,
&
argc
);
// mrb_raise(mrb, mrb->eRuntimeError_class, "string frozen");
//}
newstr
=
str
;
newstr
=
str
;
encidx
=
str_transcode
(
mrb
,
argc
,
argv
,
&
newstr
);
encidx
=
str_transcode
(
mrb
,
argc
,
argv
,
&
newstr
);
...
@@ -2770,10 +2766,12 @@ str_encode(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value str)
...
@@ -2770,10 +2766,12 @@ str_encode(mrb_state *mrb, /*int argc, mrb_value *argv,*/ mrb_value str)
{
{
mrb_value
argv
[
16
];
mrb_value
argv
[
16
];
int
argc
;
int
argc
;
mrb_value
newstr
;
int
encidx
;
mrb_get_args
(
mrb
,
"*"
,
&
argv
,
&
argc
);
mrb_get_args
(
mrb
,
"*"
,
&
argv
,
&
argc
);
mrb_value
newstr
=
str
;
newstr
=
str
;
int
encidx
=
str_transcode
(
mrb
,
argc
,
argv
,
&
newstr
);
encidx
=
str_transcode
(
mrb
,
argc
,
argv
,
&
newstr
);
if
(
encidx
<
0
)
return
mrb_str_dup
(
mrb
,
str
);
if
(
encidx
<
0
)
return
mrb_str_dup
(
mrb
,
str
);
if
(
mrb_obj_equal
(
mrb
,
newstr
,
str
))
{
if
(
mrb_obj_equal
(
mrb
,
newstr
,
str
))
{
...
@@ -3908,11 +3906,11 @@ econv_insert_output(mrb_state *mrb, mrb_value self)
...
@@ -3908,11 +3906,11 @@ econv_insert_output(mrb_state *mrb, mrb_value self)
{
{
mrb_value
string
;
mrb_value
string
;
const
char
*
insert_enc
;
const
char
*
insert_enc
;
mrb_econv_t
*
ec
;
int
ret
;
int
ret
;
mrb_get_args
(
mrb
,
"o"
,
&
string
);
mrb_get_args
(
mrb
,
"o"
,
&
string
);
mrb_econv_t
*
ec
=
check_econv
(
mrb
,
self
);
ec
=
check_econv
(
mrb
,
self
);
//StringValue(string);
//StringValue(string);
mrb_string_value
(
mrb
,
&
string
);
mrb_string_value
(
mrb
,
&
string
);
...
...
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