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
434f0a6d
Commit
434f0a6d
authored
May 11, 2014
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2233 from suzukaze/fix-indent
Fix indents in kernel.c
parents
ad8cb8ca
1eb6c1e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
src/kernel.c
src/kernel.c
+25
-25
No files found.
src/kernel.c
View file @
434f0a6d
...
...
@@ -276,21 +276,21 @@ static void
init_copy
(
mrb_state
*
mrb
,
mrb_value
dest
,
mrb_value
obj
)
{
switch
(
mrb_type
(
obj
))
{
case
MRB_TT_CLASS
:
case
MRB_TT_MODULE
:
copy_class
(
mrb
,
dest
,
obj
);
/* fall through */
case
MRB_TT_OBJECT
:
case
MRB_TT_SCLASS
:
case
MRB_TT_HASH
:
case
MRB_TT_DATA
:
mrb_iv_copy
(
mrb
,
dest
,
obj
);
break
;
default:
break
;
}
mrb_funcall
(
mrb
,
dest
,
"initialize_copy"
,
1
,
obj
);
case
MRB_TT_CLASS
:
case
MRB_TT_MODULE
:
copy_class
(
mrb
,
dest
,
obj
);
/* fall through */
case
MRB_TT_OBJECT
:
case
MRB_TT_SCLASS
:
case
MRB_TT_HASH
:
case
MRB_TT_DATA
:
mrb_iv_copy
(
mrb
,
dest
,
obj
);
break
;
default:
break
;
}
mrb_funcall
(
mrb
,
dest
,
"initialize_copy"
,
1
,
obj
);
}
/* 15.3.1.3.8 */
...
...
@@ -326,7 +326,7 @@ mrb_obj_clone(mrb_state *mrb, mrb_value self)
mrb_value
clone
;
if
(
mrb_special_const_p
(
self
))
{
mrb_raisef
(
mrb
,
E_TYPE_ERROR
,
"can't clone %S"
,
self
);
mrb_raisef
(
mrb
,
E_TYPE_ERROR
,
"can't clone %S"
,
self
);
}
p
=
(
struct
RObject
*
)
mrb_obj_alloc
(
mrb
,
mrb_type
(
self
),
mrb_obj_class
(
mrb
,
self
));
p
->
c
=
mrb_singleton_class_clone
(
mrb
,
self
);
...
...
@@ -358,17 +358,17 @@ mrb_obj_clone(mrb_state *mrb, mrb_value self)
mrb_value
mrb_obj_dup
(
mrb_state
*
mrb
,
mrb_value
obj
)
{
struct
RBasic
*
p
;
mrb_value
dup
;
struct
RBasic
*
p
;
mrb_value
dup
;
if
(
mrb_special_const_p
(
obj
))
{
mrb_raisef
(
mrb
,
E_TYPE_ERROR
,
"can't dup %S"
,
obj
);
}
p
=
mrb_obj_alloc
(
mrb
,
mrb_type
(
obj
),
mrb_obj_class
(
mrb
,
obj
));
dup
=
mrb_obj_value
(
p
);
init_copy
(
mrb
,
dup
,
obj
);
if
(
mrb_special_const_p
(
obj
))
{
mrb_raisef
(
mrb
,
E_TYPE_ERROR
,
"can't dup %S"
,
obj
);
}
p
=
mrb_obj_alloc
(
mrb
,
mrb_type
(
obj
),
mrb_obj_class
(
mrb
,
obj
));
dup
=
mrb_obj_value
(
p
);
init_copy
(
mrb
,
dup
,
obj
);
return
dup
;
return
dup
;
}
static
mrb_value
...
...
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