Skip to content

Commit 5c3a6ea

Browse files
authored
Zend: Remove dependency on zend.h for certain headers (#12166)
1 parent 58b8393 commit 5c3a6ea

7 files changed

+18
-8
lines changed

Zend/zend_alloc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <stdio.h>
2525

2626
#include "../TSRM/TSRM.h"
27-
#include "zend.h"
2827

2928
#ifndef ZEND_MM_ALIGNMENT
3029
# error "ZEND_MM_ALIGNMENT was not defined during configure"

Zend/zend_ast.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#ifndef ZEND_AST_H
2222
#define ZEND_AST_H
2323

24-
#include "zend.h"
24+
#include "zend_types.h"
2525

2626
#ifndef ZEND_AST_SPEC
2727
# define ZEND_AST_SPEC 1

Zend/zend_compile.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
#ifndef ZEND_COMPILE_H
2121
#define ZEND_COMPILE_H
2222

23-
#include "zend.h"
2423
#include "zend_ast.h"
24+
#include "zend_types.h"
25+
#include "zend_map_ptr.h"
26+
#include "zend_alloc.h"
2527

2628
#include <stdarg.h>
2729
#include <stdint.h>
@@ -85,7 +87,6 @@ typedef struct _znode { /* used only during compilation */
8587
} u;
8688
} znode;
8789

88-
/* Temporarily defined here, to avoid header ordering issues */
8990
typedef struct _zend_ast_znode {
9091
zend_ast_kind kind;
9192
zend_ast_attr attr;
@@ -492,6 +493,9 @@ struct _zend_op_array {
492493
#define ZEND_RETURN_VALUE 0
493494
#define ZEND_RETURN_REFERENCE 1
494495

496+
#define INTERNAL_FUNCTION_PARAMETERS zend_execute_data *execute_data, zval *return_value
497+
#define INTERNAL_FUNCTION_PARAM_PASSTHRU execute_data, return_value
498+
495499
/* zend_internal_function_handler */
496500
typedef void (ZEND_FASTCALL *zif_handler)(INTERNAL_FUNCTION_PARAMETERS);
497501

Zend/zend_hash.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
#ifndef ZEND_HASH_H
2222
#define ZEND_HASH_H
2323

24-
#include "zend.h"
24+
#include "zend_types.h"
25+
#include "zend_gc.h"
26+
#include "zend_string.h"
2527
#include "zend_sort.h"
2628

2729
#define HASH_KEY_IS_STRING 1

Zend/zend_objects_API.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
#ifndef ZEND_OBJECTS_API_H
2121
#define ZEND_OBJECTS_API_H
2222

23-
#include "zend.h"
24-
#include "zend_compile.h"
23+
#include "zend_types.h"
24+
#include "zend_gc.h"
25+
#include "zend_alloc.h"
26+
#include "zend_compile.h" /* For zend_property_info */
2527

2628
#define OBJ_BUCKET_INVALID (1<<0)
2729

Zend/zend_string.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
#ifndef ZEND_STRING_H
2020
#define ZEND_STRING_H
2121

22-
#include "zend.h"
22+
#include "zend_types.h"
23+
#include "zend_gc.h"
24+
#include "zend_alloc.h"
2325

2426
BEGIN_EXTERN_C()
2527

Zend/zend_variables.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include "zend_types.h"
2525
#include "zend_gc.h"
26+
#include "zend_hash.h"
2627

2728
BEGIN_EXTERN_C()
2829

0 commit comments

Comments
 (0)