| Age | Commit message (Collapse) | Author |
|
When replacing an owned constant by a different type (constant or
shared) replace with the correct type instead of defaulting to
shared.
https://github.com/ruby/prism/commit/fbe9b131a1
|
|
According to the calloc(3) man page, when nmemb or size is 0, `calloc()` can either return NULL or a unique pointer that can be passed to `free()`.
While gcc and clang typically return a unique pointer, mruby's `mrb_calloc()` returns NULL in this case.
Since `pm_constant_pool_init()` is commonly called with capacity=0 during normal operation of Prism, explicitly handle this case by setting `list->ids` to NULL when capacity is 0.
This approach is portable across different calloc implementations and avoids potential issues with mruby's allocation behavior.
This maintains compatibility with `free()` and `realloc()`, as passing NULL pointers to these functions is explicitly allowed by their specifications.
https://github.com/ruby/prism/commit/1c32252df7
|
|
https://github.com/ruby/prism/commit/283938ed1f
|
|
https://github.com/ruby/prism/commit/c977c4c98a
|
|
https://github.com/ruby/prism/commit/f38946021e
|
|
Signed-off-by: cui fliter <imcusg@gmail.com>
|
|
https://github.com/ruby/prism/commit/08733438bd
|
|
- Add `x` prefix to malloc, calloc, realloc, and free
(eg: malloc -> xmalloc)
- By default, they are replaced with stdlib's functions at build
- You can use custom functions by defining `PRISM_CUSTOM_ALLOCATOR` macro
https://github.com/ruby/prism/commit/7a878af619
|
|
https://github.com/ruby/prism/commit/2e8bc17528
|
|
|
|
https://github.com/ruby/prism/commit/be9e2abfa3
|
|
https://github.com/ruby/prism/commit/ef26b283de
|
|
https://github.com/ruby/prism/commit/76af64eb21
|
|
https://github.com/ruby/prism/commit/6d8358c083
|
|
https://github.com/ruby/prism/commit/d906a8ceba
|
|
https://github.com/ruby/prism/commit/aca24b3a17
|
|
https://github.com/ruby/prism/commit/1985a9ba51
|
|
https://github.com/ruby/prism/commit/d469a56e7e
|
|
https://github.com/ruby/prism/commit/6f243de0c7
|
|
|
|
|