From 8c838de4a83956fec100e2da8dc4f49c4ace6298 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Fri, 15 Jun 2012 14:07:24 +0900 Subject: Time class made optinal --- include/mrbconf.h | 3 +++ src/init.c | 2 ++ src/time.c | 3 +++ 3 files changed, 8 insertions(+) diff --git a/include/mrbconf.h b/include/mrbconf.h index 3744c1827..f4f3ccaef 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -39,6 +39,9 @@ typedef intptr_t mrb_sym; #define INCLUDE_MATH /* use (non ISO) Math module */ //#undef INCLUDE_MATH /* not use (non ISO) Math module */ +#define INCLUDE_TIME /* use Time module */ +//#undef INCLUDE_TIME /* not use Time module */ + #ifdef MRUBY_DEBUG_BUILD # define PARSER_DUMP #endif diff --git a/src/init.c b/src/init.c index 1f7d4d364..13b074fd1 100644 --- a/src/init.c +++ b/src/init.c @@ -56,7 +56,9 @@ mrb_init_core(mrb_state *mrb) #endif mrb_init_exception(mrb); mrb_init_print(mrb); +#ifdef INCLUDE_TIME mrb_init_time(mrb); +#endif #ifdef INCLUDE_MATH mrb_init_math(mrb); #endif diff --git a/src/time.c b/src/time.c index 862ff57a9..1acde8ed9 100644 --- a/src/time.c +++ b/src/time.c @@ -6,6 +6,7 @@ #include "mruby.h" +#ifdef INCLUDE_TIME #include #include #include @@ -742,3 +743,5 @@ mrb_init_time(mrb_state *mrb) utc_offset(15.2.19.7.29) */ } +#endif + -- cgit v1.2.3