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
dadf06f7
Commit
dadf06f7
authored
Feb 05, 2014
by
MATSUMOTO Ryosuke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add global constant MRUBY_COPYRIGHT
parent
456a765e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
mrbgems/mruby-version/src/version.c
mrbgems/mruby-version/src/version.c
+1
-0
mrbgems/mruby-version/src/version.h
mrbgems/mruby-version/src/version.h
+15
-2
src/print.c
src/print.c
+7
-1
No files found.
mrbgems/mruby-version/src/version.c
View file @
dadf06f7
...
...
@@ -8,6 +8,7 @@ mrb_mruby_version_gem_init(mrb_state* mrb)
mrb_define_global_const
(
mrb
,
"MRUBY_VERSION"
,
mrb_str_new_cstr
(
mrb
,
MRUBY_VERSION
));
mrb_define_global_const
(
mrb
,
"MRUBY_RELEASE_DATE"
,
mrb_str_new_cstr
(
mrb
,
MRUBY_RELEASE_DATE
));
mrb_define_global_const
(
mrb
,
"MRUBY_DESCRIPTION"
,
mrb_str_new_cstr
(
mrb
,
MRUBY_DESCRIPTION
));
mrb_define_global_const
(
mrb
,
"MRUBY_COPYRIGHT"
,
mrb_str_new_cstr
(
mrb
,
MRUBY_COPYRIGHT
));
}
void
...
...
mrbgems/mruby-version/src/version.h
View file @
dadf06f7
...
...
@@ -7,6 +7,19 @@
#define MRUBY_RELEASE_MONTH 1
#define MRUBY_RELEASE_DAY 10
#define MRUBY_DESCRIPTION \
"mruby "MRUBY_VERSION \
#define MRUBY_BIRTH_YEAR 2011
#define MRUBY_AUTHOR "mruby developers"
#define STRINGIZE0(expr) #expr
#define STRINGIZE(expr) STRINGIZE0(expr)
#define MRUBY_DESCRIPTION \
"mruby "MRUBY_VERSION \
" ("MRUBY_RELEASE_DATE") "
#define MRUBY_COPYRIGHT \
"mruby - Copyright (c) " \
STRINGIZE(MRUBY_BIRTH_YEAR)"-" \
STRINGIZE(MRUBY_RELEASE_YEAR)" " \
MRUBY_AUTHOR
src/print.c
View file @
dadf06f7
...
...
@@ -73,6 +73,12 @@ mrb_show_copyright(mrb_state *mrb)
static
const
char
copyright_msg
[]
=
"mruby - Copyright (c) 2010-2014 mruby developers
\n
"
;
mrb_value
msg
;
msg
=
mrb_str_new
(
mrb
,
copyright_msg
,
sizeof
(
copyright_msg
)
-
1
);
if
(
mrb_const_defined
(
mrb
,
mrb_obj_value
(
mrb
->
object_class
),
mrb_intern_lit
(
mrb
,
"MRUBY_COPYRIGHT"
)))
{
msg
=
mrb_const_get
(
mrb
,
mrb_obj_value
(
mrb
->
object_class
),
mrb_intern_lit
(
mrb
,
"MRUBY_COPYRIGHT"
));
msg
=
mrb_funcall
(
mrb
,
msg
,
"+"
,
1
,
mrb_str_new_cstr
(
mrb
,
"
\n
"
));
}
else
{
msg
=
mrb_str_new
(
mrb
,
copyright_msg
,
sizeof
(
copyright_msg
)
-
1
);
}
printstr
(
mrb
,
msg
);
}
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