Skip to content

Commit 738fb5c

Browse files
MaxKellermannGirgias
authored andcommitted
Zend/zend_smart_str: include cleanup
1 parent 9fdbefa commit 738fb5c

5 files changed

+19
-6
lines changed

Zend/zend_smart_str.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17-
#include <zend.h>
1817
#include "zend_smart_str.h"
1918
#include "zend_smart_string.h"
19+
#include "zend_globals_macros.h" // for EG()
20+
#include "zend_globals.h" // struct _zend_executor_globals
21+
#include "zend_strtod.h" // for zend_gcvt()
2022

2123
#define SMART_STR_OVERHEAD (ZEND_MM_OVERHEAD + _ZSTR_HEADER_SIZE + 1)
2224
#define SMART_STR_START_SIZE 256

Zend/zend_smart_str.h

+7-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@
1717
#ifndef ZEND_SMART_STR_H
1818
#define ZEND_SMART_STR_H
1919

20-
#include <zend.h>
21-
#include "zend_globals.h"
2220
#include "zend_smart_str_public.h"
2321

22+
#include "zend_operators.h" // for zend_print_long_to_buf()
23+
#include "zend_portability.h" // for BEGIN_EXTERN_C
24+
#include "zend_string.h"
25+
26+
// forward declarations
27+
typedef struct _zval_struct zval;
28+
2429
BEGIN_EXTERN_C()
2530

2631
ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len);

Zend/zend_smart_str_public.h

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
#ifndef ZEND_SMART_STR_PUBLIC_H
1818
#define ZEND_SMART_STR_PUBLIC_H
1919

20+
#include <stddef.h> // for size_t
21+
22+
// forward declarations
23+
typedef struct _zend_string zend_string;
24+
2025
typedef struct {
2126
/** See smart_str_extract() */
2227
zend_string *s;

Zend/zend_smart_string.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020

2121
#include "zend_smart_string_public.h"
2222

23-
#include <stdlib.h>
24-
#include <zend.h>
23+
#include "zend_alloc.h" // for pefree()
24+
#include "zend_operators.h" // for zend_print_long_to_buf()
25+
#include "zend_portability.h" // for ZEND_FASTCALL
2526

2627
/* wrapper */
2728

Zend/zend_smart_string_public.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef PHP_SMART_STRING_PUBLIC_H
1919
#define PHP_SMART_STRING_PUBLIC_H
2020

21-
#include <sys/types.h>
21+
#include <stddef.h> // for size_t
2222

2323
typedef struct {
2424
char *c;

0 commit comments

Comments
 (0)