mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add extern "C" guards; close #126
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user