add extern "C" guards; close #126

This commit is contained in:
Yukihiro Matsumoto
2012-05-18 02:02:49 +09:00
parent e67c03529d
commit a4d3579e31
15 changed files with 139 additions and 5 deletions
+9
View File
@@ -7,6 +7,10 @@
#ifndef MRUBY_OBJECT_H
#define MRUBY_OBJECT_H
#if defined(__cplusplus)
extern "C" {
#endif
#define MRUBY_OBJECT_HEADER \
enum mrb_vtype tt:8; \
int color:3;\
@@ -49,4 +53,9 @@ struct RObject {
#define ROBJECT(v) ((struct RObject*)((v).value.p))
#define ROBJECT_IVPTR(v) (((struct RObject*)((v).value.p))->iv)
#define ROBJECT_NUMIV(v) (ROBJECT_IVPTR(v) ? ROBJECT_IVPTR(v)->size : 0)
#if defined(__cplusplus)
} /* extern "C" { */
#endif
#endif /* MRUBY_OBJECT_H */