Commit Graph

29 Commits

Author SHA1 Message Date
dearblue fab062f7b5 Remove duplicates header files in src/pool.c
These are included in `mruby.h`.

As a background, if `enable_cxx_abi` is specified, the macro that
defines the maximum value in `stdint.h` is undefined depending on the
environment.

- Confirmed with gcc on FreeBSD 12.0 and mingw32-gcc available on
  FreeBSD.
- `INTPTR_MAX`, `INT64_MAX` and `UINT64_MAX` are defined by `cstdint`
  added in C++11. But `toolchains :gcc` adds `-std=c++03`, so the macros
  are not defined.
- To have these defined in `C++03`, `__STDC_CONSTANT_MACROS` must be
  defined in advance. This is already done by `mruby.h`.
2019-10-03 23:32:24 +09:00
Tomasz Dąbrowski 220c628210 fix: src\pool.c(33): warning C4200: nonstandard extension used: zero-sized array in struct/union 2017-09-27 22:22:05 +02:00
take_cheeze b2dc04393a Align pool allocator with 8 byte in 64-bit environment.
To avoid warnings from undefined sanitizer.
( https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html )
2017-04-21 17:34:31 +09:00
Yukihiro "Matz" Matsumoto 5c405dea3d include changed from by quotes ("") to by brackets (<>); close #3032 2015-11-27 17:48:23 +09:00
Jun Hiroe ec7dbee4b1 Fix indent 2014-10-28 01:52:50 +09:00
Tatsuhiko Kubo 5fa30aeaea Fix mismatches for MRB_API declarations. 2014-08-29 01:06:22 +09:00
Tatsuhiko Kubo 5ee00453e0 Fix error handling for mrb_pool_realloc().
mrb_pool_alloc() may return NULL.
2014-08-20 05:07:40 +09:00
cremno 307c356c8a pool: use mrb_malloc_simple instead of mrb_malloc 2014-03-07 20:55:11 +01:00
cremno 0c96b936dc MSVC: fix C4146
C4146 (unary minus operator applied to unsigned type, result still
unsigned)
2014-03-07 20:48:44 +01:00
Yukihiro "Matz" Matsumoto 18c167b8b5 Merge pull request #1380 from suzukaze/refactor-pool.c
Replace 0 with NULL because struct pointer is set NULL in.
2013-07-14 18:41:12 -07:00
Jun Hiroe efac8db674 Replace int with mrb_bool because a return value is boolean. 2013-07-14 23:51:44 +09:00
Jun Hiroe 65736fa36c Replace 0 with NULL because struct pointer is set NULL in. 2013-07-14 23:42:31 +09:00
Masaki Muranaka 2109a99e5b Add void to function parameters. This is for compatibility with C++ 2013-04-26 11:33:06 +09:00
Masaki Muranaka 2b5b161f8b Sort include files. Some redundant includes are removed. 2013-03-29 10:22:31 +09:00
kano4 50d3041d68 Use C99 flexible array in pool.c 2013-03-26 23:29:42 +09:00
Yukihiro Matsumoto 1ed39d5c05 use TRUE/FALSE instead of 1/0 2012-08-13 04:19:24 +09:00
Masaki Muranaka 0cee3bb531 POOL_ALIGNMENT POOL_PAGE_SIZE : Configurable parameters. 2012-07-31 16:50:09 +09:00
Max Anselm 5a4beeed2d Make all(?) void casts explicit for C++ 2012-07-29 19:48:48 -04:00
Yukihiro Matsumoto 48c73ac630 less <stdio.h> 2012-07-13 10:13:47 +09:00
Yukihiro Matsumoto 04d24b3168 always define POOL_ALIGNMENT (default 4); reduce strength as well; close #333 2012-06-28 15:07:11 +09:00
Mitchell Blank Jr 3471e2b134 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
2012-05-19 22:40:57 -07:00
Yukihiro Matsumoto 59da9f6974 remove src/pool.h; close #163 2012-05-19 16:56:15 +09:00
sasaki takeru 7f12cb9e7a fix typo 2012-05-10 04:04:59 +09:00
Yukihiro Matsumoto c95279c6bf rename ALIGN macros 2012-05-07 23:23:36 +09:00
Yuichiro MASUI f8e50025bf fixed #86 memory alignment error on ARM 2012-05-02 21:04:20 +09:00
roco 4ec6d41f16 rm whitespace 2012-04-30 14:29:19 -07:00
mimaki 835443614d add file header 2012-04-23 11:46:16 +09:00
NAKAMURA Usaku d2a38520ab void* does not have its size. 2012-04-20 15:40:19 +09:00
mimaki e0d6430f63 add mruby sources 2012-04-20 09:39:03 +09:00