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
97a18ff4
Commit
97a18ff4
authored
Jun 14, 2015
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2833 from cremno/call-mrb_inspect
refactor code to call mrb_inspect() instead
parents
d2433a77
5e8d2a4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c
+1
-5
src/print.c
src/print.c
+1
-5
No files found.
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c
View file @
97a18ff4
...
...
@@ -11,12 +11,8 @@
static
void
p
(
mrb_state
*
mrb
,
mrb_value
obj
)
{
mrb_value
val
;
mrb_value
val
=
mrb_inspect
(
mrb
,
obj
)
;
val
=
mrb_funcall
(
mrb
,
obj
,
"inspect"
,
0
);
if
(
!
mrb_string_p
(
val
))
{
val
=
mrb_obj_as_string
(
mrb
,
obj
);
}
fwrite
(
RSTRING_PTR
(
val
),
RSTRING_LEN
(
val
),
1
,
stdout
);
putc
(
'\n'
,
stdout
);
}
...
...
src/print.c
View file @
97a18ff4
...
...
@@ -27,12 +27,8 @@ MRB_API void
mrb_p
(
mrb_state
*
mrb
,
mrb_value
obj
)
{
#ifdef ENABLE_STDIO
mrb_value
val
;
mrb_value
val
=
mrb_inspect
(
mrb
,
obj
)
;
val
=
mrb_funcall
(
mrb
,
obj
,
"inspect"
,
0
);
if
(
!
mrb_string_p
(
val
))
{
val
=
mrb_obj_as_string
(
mrb
,
obj
);
}
printstr
(
mrb
,
val
);
putc
(
'\n'
,
stdout
);
#endif
...
...
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