]> granicus.if.org Git - php/commit
Clean up spl_fixedarray.c
authorLevi Morrison <levi.morrison@datadoghq.com>
Sun, 27 Sep 2020 17:17:17 +0000 (11:17 -0600)
committerLevi Morrison <levi.morrison@datadoghq.com>
Sun, 27 Sep 2020 18:25:02 +0000 (12:25 -0600)
commit3b34d74a45ec771898dbecae67478ed288e413e0
tree85503cf4e8d13aab52fb8e4bf20b1919a4591d7b
parent36ed9966ce791676dd435fd3ee5fc67a17bc09b2
Clean up spl_fixedarray.c

Remove inline.
Remove old folding blocks.
Convert an int usage to bool.

Convert some uses of int and size_t into zend_long. This is
incomplete because get_gc requires `int *n`, which should probably
become zend_long or size_t eventually.

Adds spl_fixedarray_empty to help enforce invariants.
Adds spl_fixedarray_default_ctor.
Documents some functions.

Reworks spl_fixedarray_copy into two functions:
  - spl_fixedarray_copy_ctor
  - spl_fixedarray_copy_range

I'm hoping to eventually export SplFixedArray for extensions to
use directly, which is the motivation here.
ext/spl/spl_fixedarray.c