diff options
| -rw-r--r-- | include/mruby/data.h | 7 | ||||
| -rw-r--r-- | src/compile.h | 12 | ||||
| -rw-r--r-- | src/gc.h | 8 |
3 files changed, 23 insertions, 4 deletions
diff --git a/include/mruby/data.h b/include/mruby/data.h index d4ce82e40..4c136555c 100644 --- a/include/mruby/data.h +++ b/include/mruby/data.h @@ -4,14 +4,13 @@ ** See Copyright Notice in mruby.h */ -#ifndef RUBY_DATA_H -#define RUBY_DATA_H 1 +#ifndef MRUBY_DATA_H +#define MRUBY_DATA_H 1 #if defined(__cplusplus) extern "C" { #endif - struct mrb_data_type { const char *struct_name; void (*dfree)(mrb_state *mrb, void*); @@ -48,4 +47,4 @@ void *mrb_check_datatype(mrb_state *mrb, mrb_value, const struct mrb_data_type*) } /* extern "C" { */ #endif -#endif /* RUBY_DATA_H */ +#endif /* MRUBY_DATA_H */ diff --git a/src/compile.h b/src/compile.h index 7afa82e76..3cebb68f0 100644 --- a/src/compile.h +++ b/src/compile.h @@ -4,6 +4,13 @@ ** See Copyright Notice in mruby.h */ +#ifndef RUBY_COMPILE_H +#define RUBY_COMPILE_H 1 + +#if defined(__cplusplus) +extern "C" { +#endif + #include "mruby.h" #include <stdio.h> #include <setjmp.h> @@ -93,3 +100,8 @@ int mrb_compile_file(mrb_state*,FILE*); int mrb_compile_string(mrb_state*,char*); int mrb_compile_nstring(mrb_state*,char*,size_t); +#if defined(__cplusplus) +} /* extern "C" { */ +#endif + +#endif /* MRUBY_COMPILE_H */ @@ -7,6 +7,10 @@ #ifndef MRUBY_GC_H #define MRUBY_GC_H +#if defined(__cplusplus) +extern "C" { +#endif + typedef struct { union { struct free_obj { @@ -41,4 +45,8 @@ void mrb_gc_mark_ht(mrb_state*, struct RHash*); size_t mrb_gc_mark_ht_size(mrb_state*, struct RHash*); void mrb_gc_free_ht(mrb_state*, struct RHash*); +#if defined(__cplusplus) +} /* extern "C" { */ +#endif + #endif /* MRUBY_GC_H */ |
