mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
C++ compilability - don't define types inside others
The following is legal code in both C and C++:
struct foo {
struct bar { int a } x;
int y;
};
...however in C++ it defines a type called "foo::bar" instead of "bar".
Just avoid this construct altogether
This commit is contained in:
@@ -11,12 +11,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct mrb_range_edges {
|
||||
mrb_value beg;
|
||||
mrb_value end;
|
||||
};
|
||||
|
||||
struct RRange {
|
||||
MRUBY_OBJECT_HEADER;
|
||||
struct mrb_range_edges {
|
||||
mrb_value beg;
|
||||
mrb_value end;
|
||||
} *edges;
|
||||
struct mrb_range_edges *edges;
|
||||
int excl;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user