diff options
| author | Mitchell Blank Jr <[email protected]> | 2012-05-19 22:40:57 -0700 |
|---|---|---|
| committer | Mitchell Blank Jr <[email protected]> | 2012-05-19 22:40:57 -0700 |
| commit | 3471e2b1340cb84504272da26051f149f350ee94 (patch) | |
| tree | 3e84410470fb2f98bd5369511c53901c612d0b0d /src/pool.c | |
| parent | 4105b595684bb9f1e176563f819de2917d0471fd (diff) | |
| download | mruby-3471e2b1340cb84504272da26051f149f350ee94.tar.gz mruby-3471e2b1340cb84504272da26051f149f350ee94.zip | |
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
Diffstat (limited to 'src/pool.c')
| -rw-r--r-- | src/pool.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/pool.c b/src/pool.c index a367a30a5..3cbb2b163 100644 --- a/src/pool.c +++ b/src/pool.c @@ -8,15 +8,17 @@ #include <stddef.h> #include <string.h> +struct mrb_pool_page { + struct mrb_pool_page *next; + size_t offset; + size_t len; + void *last; + char page[1]; +}; + struct mrb_pool { mrb_state *mrb; - struct mrb_pool_page { - struct mrb_pool_page *next; - size_t offset; - size_t len; - void *last; - char page[1]; - } *pages; + struct mrb_pool_page *pages; }; #undef TEST_POOL |
