From 3471e2b1340cb84504272da26051f149f350ee94 Mon Sep 17 00:00:00 2001 From: Mitchell Blank Jr Date: Sat, 19 May 2012 22:40:57 -0700 Subject: 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 --- include/mruby/range.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/mruby/range.h b/include/mruby/range.h index b95838375..036cdd574 100644 --- a/include/mruby/range.h +++ b/include/mruby/range.h @@ -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; }; -- cgit v1.2.3