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)

0 commit comments

Comments
 (0)