diff options
Diffstat (limited to 'include/mrbconf.h')
| -rw-r--r-- | include/mrbconf.h | 66 |
1 files changed, 53 insertions, 13 deletions
diff --git a/include/mrbconf.h b/include/mrbconf.h index e90b685bb..20f49ec29 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -8,7 +8,41 @@ #define MRUBYCONF_H #include <stdint.h> -#undef MRB_USE_FLOAT + +/* configuration options: */ +/* add -DMRB_USE_FLOAT to use float instead of double for floating point numbers */ +//#define MRB_USE_FLOAT + +/* argv max size in mrb_funcall */ +//#define MRB_FUNCALL_ARGC_MAX 16 + +/* number of object per heap page */ +//#define MRB_HEAP_PAGE_SIZE 1024 + +/* initial size for IV khash */ +//#define MRB_IV_INITIAL_SIZE 8 + +/* default size of khash table bucket */ +//#define KHASH_DEFAULT_SIZE 32 + +/* allocated memory address alignment */ +//#define POOL_ALIGNMENT 4 + +/* page size of memory pool */ +//#define POOL_PAGE_SIZE 16000 + +/* -DDISABLE_XXXX to drop the feature */ +#define DISABLE_REGEXP /* regular expression classes */ +//#define DISABLE_SPRINTF /* Kernel.sprintf method */ +//#define DISABLE_MATH /* Math functions */ +//#define DISABLE_TIME /* Time class */ +//#define DISABLE_STRUCT /* Struct class */ +//#define DISABLE_STDIO /* use of stdio */ + +#undef HAVE_UNISTD_H /* WINDOWS */ +#define HAVE_UNISTD_H /* LINUX */ + +/* end of configuration */ #ifdef MRB_USE_FLOAT typedef float mrb_float; @@ -19,20 +53,26 @@ typedef double mrb_float; typedef int mrb_int; typedef intptr_t mrb_sym; -#define readint(p,base) strtol((p),NULL,(base)) - -#undef INCLUDE_ENCODING /* not use encoding classes (ascii only) */ -//#define INCLUDE_ENCODING /* use UTF-8 encoding classes */ - -#undef INCLUDE_REGEXP /* not use regular expression classes */ -//#define INCLUDE_REGEXP /* use regular expression classes */ -#ifdef INCLUDE_REGEXP -# define INCLUDE_ENCODING /* Regexp depends Encoding */ +/* define ENABLE_XXXX from DISABLE_XXX */ +#ifndef DISABLE_REGEXP +#define ENABLE_REGEXP +#endif +#ifndef DISABLE_SPRINTF +#define ENABLE_SPRINTF +#endif +#ifndef DISABLE_MATH +#define ENABLE_MATH +#endif +#ifndef DISABLE_TIME +#define ENABLE_TIME +#endif +#ifndef DISABLE_STRUCT +#define ENABLE_STRUCT +#endif +#ifndef DISABLE_STDIO +#define ENABLE_STDIO #endif - -#undef HAVE_UNISTD_H /* WINDOWS */ -#define HAVE_UNISTD_H /* LINUX */ #ifndef FALSE # define FALSE 0 |
