Skip to content

Commit 54047c1

Browse files
committed
ext/spl: Remove some useless header includes and clarify usages
1 parent 3fd60d3 commit 54047c1

16 files changed

+7
-30
lines changed

ext/spl/spl_array.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include "zend_interfaces.h"
2525
#include "zend_exceptions.h"
2626

27-
#include "php_spl.h"
2827
#include "spl_functions.h"
2928
#include "spl_iterators.h"
3029
#include "spl_array.h"

ext/spl/spl_array.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#define SPL_ARRAY_H
1919

2020
#include "php.h"
21-
#include "php_spl.h"
22-
#include "spl_iterators.h"
2321

2422
#define SPL_ARRAY_STD_PROP_LIST 0x00000001
2523
#define SPL_ARRAY_ARRAY_AS_PROPS 0x00000002

ext/spl/spl_directory.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
#include "zend_exceptions.h"
2828
#include "zend_interfaces.h"
2929

30-
#include "php_spl.h"
31-
#include "spl_functions.h"
30+
#include "spl_functions.h" /* For spl_gen_private_prop_name() */
3231
#include "spl_iterators.h"
3332
#include "spl_directory.h"
3433
#include "spl_directory_arginfo.h"

ext/spl/spl_directory.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#define SPL_DIRECTORY_H
1919

2020
#include "php.h"
21-
#include "php_spl.h"
2221

2322
extern PHPAPI zend_class_entry *spl_ce_SplFileInfo;
2423
extern PHPAPI zend_class_entry *spl_ce_DirectoryIterator;

ext/spl/spl_dllist.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@
2323
#include "zend_exceptions.h"
2424
#include "zend_hash.h"
2525

26-
#include "php_spl.h"
2726
#include "ext/standard/php_var.h"
2827
#include "zend_smart_str.h"
29-
#include "spl_functions.h"
30-
#include "spl_iterators.h"
28+
#include "spl_functions.h" /* For spl_gen_private_prop_name() */
3129
#include "spl_dllist.h"
3230
#include "spl_dllist_arginfo.h"
3331
#include "spl_exceptions.h"

ext/spl/spl_dllist.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#define SPL_DLLIST_H
1919

2020
#include "php.h"
21-
#include "php_spl.h"
2221

2322
#define SPL_DLLIST_IT_KEEP 0x00000000
2423
#define SPL_DLLIST_IT_FIFO 0x00000000 /* FIFO flag makes the iterator traverse the structure as a FirstInFirstOut */

ext/spl/spl_exceptions.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "zend_exceptions.h"
2424
#include "spl_exceptions_arginfo.h"
2525

26-
#include "php_spl.h"
2726
#include "spl_exceptions.h"
2827

2928
PHPAPI zend_class_entry *spl_ce_LogicException;

ext/spl/spl_exceptions.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#define SPL_EXCEPTIONS_H
1919

2020
#include "php.h"
21-
#include "php_spl.h"
2221

2322
extern PHPAPI zend_class_entry *spl_ce_LogicException;
2423
extern PHPAPI zend_class_entry *spl_ce_BadFunctionCallException;

ext/spl/spl_fixedarray.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,10 @@
2323
#include "zend_interfaces.h"
2424
#include "zend_exceptions.h"
2525

26-
#include "php_spl.h"
2726
#include "spl_fixedarray_arginfo.h"
28-
#include "spl_functions.h"
2927
#include "spl_fixedarray.h"
3028
#include "spl_exceptions.h"
31-
#include "spl_iterators.h"
32-
#include "ext/json/php_json.h"
29+
#include "ext/json/php_json.h" /* For php_json_serializable_ce */
3330

3431
static zend_object_handlers spl_handler_SplFixedArray;
3532
PHPAPI zend_class_entry *spl_ce_SplFixedArray;

ext/spl/spl_functions.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#endif
2020

2121
#include "php.h"
22-
#include "php_spl.h"
2322

2423
/* {{{ spl_add_class_name */
2524
void spl_add_class_name(zval *list, zend_class_entry *pce, int allow, int ce_flags)

ext/spl/spl_heap.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
#include "zend_interfaces.h"
2323
#include "zend_exceptions.h"
2424

25-
#include "php_spl.h"
2625
#include "spl_functions.h"
27-
#include "spl_iterators.h"
2826
#include "spl_heap.h"
2927
#include "spl_heap_arginfo.h"
3028
#include "spl_exceptions.h"

ext/spl/spl_heap.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#define SPL_HEAP_H
1919

2020
#include "php.h"
21-
#include "php_spl.h"
2221

2322
#define SPL_PQUEUE_EXTR_MASK 0x00000003
2423
#define SPL_PQUEUE_EXTR_BOTH 0x00000003

ext/spl/spl_iterators.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,9 @@
2323
#include "zend_interfaces.h"
2424
#include "ext/pcre/php_pcre.h"
2525

26-
#include "php_spl.h"
27-
#include "spl_functions.h"
2826
#include "spl_iterators.h"
2927
#include "spl_iterators_arginfo.h"
30-
#include "spl_directory.h"
31-
#include "spl_array.h"
28+
#include "spl_array.h" /* For spl_ce_ArrayIterator */
3229
#include "spl_exceptions.h"
3330
#include "zend_smart_str.h"
3431

ext/spl/spl_iterators.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#define SPL_ITERATORS_H
1919

2020
#include "php.h"
21-
#include "php_spl.h"
2221

2322
extern PHPAPI zend_class_entry *spl_ce_AppendIterator;
2423
extern PHPAPI zend_class_entry *spl_ce_CachingIterator;

ext/spl/spl_observer.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,17 @@
2020
#endif
2121

2222
#include "php.h"
23-
#include "ext/standard/php_array.h"
23+
#include "ext/standard/php_array.h" /* For PHP_COUNT_* constants */
2424
#include "ext/standard/php_var.h"
2525
#include "zend_smart_str.h"
2626
#include "zend_interfaces.h"
2727
#include "zend_exceptions.h"
2828

29-
#include "php_spl.h"
30-
#include "spl_functions.h"
29+
#include "php_spl.h" /* For php_spl_object_hash() */
30+
#include "spl_functions.h" /* For spl_gen_private_prop_name() */
3131
#include "spl_observer.h"
3232
#include "spl_observer_arginfo.h"
3333
#include "spl_iterators.h"
34-
#include "spl_array.h"
3534
#include "spl_exceptions.h"
3635

3736
PHPAPI zend_class_entry *spl_ce_SplObserver;

ext/spl/spl_observer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#define SPL_OBSERVER_H
1919

2020
#include "php.h"
21-
#include "php_spl.h"
2221

2322
typedef enum {
2423
MIT_NEED_ANY = 0,

0 commit comments

Comments
 (0)