Zend/zend_smart_str: include cleanup

This commit is contained in:
Max Kellermann 2023-01-04 10:05:17 +01:00 committed by George Peter Banyard
parent 9fdbefacd3
commit 738fb5ca54
5 changed files with 19 additions and 6 deletions

View File

@ -14,9 +14,11 @@
+----------------------------------------------------------------------+
*/
#include <zend.h>
#include "zend_smart_str.h"
#include "zend_smart_string.h"
#include "zend_globals_macros.h" // for EG()
#include "zend_globals.h" // struct _zend_executor_globals
#include "zend_strtod.h" // for zend_gcvt()
#define SMART_STR_OVERHEAD (ZEND_MM_OVERHEAD + _ZSTR_HEADER_SIZE + 1)
#define SMART_STR_START_SIZE 256

View File

@ -17,10 +17,15 @@
#ifndef ZEND_SMART_STR_H
#define ZEND_SMART_STR_H
#include <zend.h>
#include "zend_globals.h"
#include "zend_smart_str_public.h"
#include "zend_operators.h" // for zend_print_long_to_buf()
#include "zend_portability.h" // for BEGIN_EXTERN_C
#include "zend_string.h"
// forward declarations
typedef struct _zval_struct zval;
BEGIN_EXTERN_C()
ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len);

View File

@ -17,6 +17,11 @@
#ifndef ZEND_SMART_STR_PUBLIC_H
#define ZEND_SMART_STR_PUBLIC_H
#include <stddef.h> // for size_t
// forward declarations
typedef struct _zend_string zend_string;
typedef struct {
/** See smart_str_extract() */
zend_string *s;

View File

@ -20,8 +20,9 @@
#include "zend_smart_string_public.h"
#include <stdlib.h>
#include <zend.h>
#include "zend_alloc.h" // for pefree()
#include "zend_operators.h" // for zend_print_long_to_buf()
#include "zend_portability.h" // for ZEND_FASTCALL
/* wrapper */

View File

@ -18,7 +18,7 @@
#ifndef PHP_SMART_STRING_PUBLIC_H
#define PHP_SMART_STRING_PUBLIC_H
#include <sys/types.h>
#include <stddef.h> // for size_t
typedef struct {
char *c;