mbed I/F binding for mruby

Dependents:   mruby_mbed_web mirb_mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mrbconf.h Source File

mrbconf.h

00001 /*
00002 ** mrbconf.h - mruby core configuration
00003 **
00004 ** See Copyright Notice in mruby.h
00005 */
00006 
00007 #ifndef MRUBYCONF_H
00008 #define MRUBYCONF_H
00009 
00010 /* configuration options: */
00011 /* add -DMRB_USE_FLOAT to use float instead of double for floating point numbers */
00012 //#define MRB_USE_FLOAT
00013 
00014 /* add -DMRB_INT16 to use 16bit integer for mrb_int; conflict with MRB_INT64 */
00015 //#define MRB_INT16
00016 
00017 /* add -DMRB_INT64 to use 64bit integer for mrb_int; conflict with MRB_INT16 */
00018 //#define MRB_INT64
00019 
00020 /* represent mrb_value in boxed double; conflict with MRB_USE_FLOAT */
00021 //#define MRB_NAN_BOXING
00022 
00023 /* define on big endian machines; used by MRB_NAN_BOXING */
00024 //#define MRB_ENDIAN_BIG
00025 
00026 /* represent mrb_value as a word (natural unit of data for the processor) */
00027 //#define MRB_WORD_BOXING
00028 
00029 /* argv max size in mrb_funcall */
00030 //#define MRB_FUNCALL_ARGC_MAX 16
00031 
00032 /* number of object per heap page */
00033 //#define MRB_HEAP_PAGE_SIZE 1024
00034 
00035 /* use segmented list for IV table */
00036 //#define MRB_USE_IV_SEGLIST
00037 
00038 /* initial size for IV khash; ignored when MRB_USE_IV_SEGLIST is set */
00039 //#define MRB_IVHASH_INIT_SIZE 8
00040 
00041 /* if _etext and _edata available, mruby can reduce memory used by symbols */
00042 //#define MRB_USE_ETEXT_EDATA
00043 
00044 /* do not use __init_array_start to determine readonly data section;
00045    effective only when MRB_USE_ETEXT_EDATA is defined */
00046 //#define MRB_NO_INIT_ARRAY_START
00047 
00048 /* turn off generational GC by default */
00049 //#define MRB_GC_TURN_OFF_GENERATIONAL
00050 
00051 /* default size of khash table bucket */
00052 //#define KHASH_DEFAULT_SIZE 32
00053 
00054 /* allocated memory address alignment */
00055 //#define POOL_ALIGNMENT 4
00056 
00057 /* page size of memory pool */
00058 //#define POOL_PAGE_SIZE 16000
00059 
00060 /* initial minimum size for string buffer */
00061 //#define MRB_STR_BUF_MIN_SIZE 128
00062 
00063 /* arena size */
00064 //#define MRB_GC_ARENA_SIZE 100
00065 
00066 /* fixed size GC arena */
00067 //#define MRB_GC_FIXED_ARENA
00068 
00069 /* state atexit stack size */
00070 //#define MRB_FIXED_STATE_ATEXIT_STACK_SIZE 5
00071 
00072 /* fixed size state atexit stack */
00073 //#define MRB_FIXED_STATE_ATEXIT_STACK
00074 
00075 /* -DDISABLE_XXXX to drop following features */
00076 //#define DISABLE_STDIO     /* use of stdio */
00077 
00078 /* -DENABLE_XXXX to enable following features */
00079 //#define ENABLE_DEBUG      /* hooks for debugger */
00080 
00081 /* end of configuration */
00082 
00083 /* define ENABLE_XXXX from DISABLE_XXX */
00084 #ifndef DISABLE_STDIO
00085 #define ENABLE_STDIO
00086 #endif
00087 #ifndef ENABLE_DEBUG
00088 #define DISABLE_DEBUG
00089 #endif
00090 
00091 #ifdef ENABLE_STDIO
00092 # include <stdio.h>
00093 #endif
00094 
00095 #ifndef FALSE
00096 # define FALSE 0
00097 #endif
00098 
00099 #ifndef TRUE
00100 # define TRUE 1
00101 #endif
00102 
00103 #if defined(MRB_BUILD_AS_DLL)
00104 
00105 #if defined(MRB_CORE) || defined(MRB_LIB)
00106 #define MRB_API __declspec(dllexport)
00107 #else
00108 #define MRB_API __declspec(dllimport)
00109 #endif
00110 #else
00111 #define MRB_API extern
00112 #endif
00113 
00114 #endif  /* MRUBYCONF_H */
00115