Skip to content

Commit 3bce116

Browse files
Zend/zend_types.h: move zend_result to separate header (#10609)
Many sources need just `zend_result`, and with this new header, they only need to include `zend_result.h` instead of `zend_types.h`; the latter is large and has fat dependencies, which slows down the build.
1 parent e52684e commit 3bce116

14 files changed

+50
-7
lines changed

Zend/Optimizer/zend_ssa.h

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

2222
#include "zend_optimizer.h"
2323
#include "zend_cfg.h"
24+
#include "zend_result.h"
2425

2526
typedef struct _zend_ssa_range {
2627
zend_long min;

Zend/zend_alloc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#ifndef ZEND_ALLOC_H
2222
#define ZEND_ALLOC_H
2323

24+
#include "zend_result.h"
25+
2426
#include <stdio.h>
2527

2628
#include "../TSRM/TSRM.h"

Zend/zend_builtin_functions.h

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

23+
#include "zend_result.h"
24+
2325
zend_result zend_startup_builtin_functions(void);
2426

2527
BEGIN_EXTERN_C()

Zend/zend_exceptions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#ifndef ZEND_EXCEPTIONS_H
2323
#define ZEND_EXCEPTIONS_H
2424

25+
#include "zend_result.h"
26+
2527
BEGIN_EXTERN_C()
2628

2729
extern ZEND_API zend_class_entry *zend_ce_throwable;

Zend/zend_extensions.h

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

2323
#include "zend_compile.h"
2424
#include "zend_build.h"
25+
#include "zend_result.h"
2526

2627
/*
2728
The constants below are derived from ext/opcache/ZendAccelerator.h

Zend/zend_highlight.h

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

23+
#include "zend_result.h"
24+
2325
#define HL_COMMENT_COLOR "#FF8000" /* orange */
2426
#define HL_DEFAULT_COLOR "#0000BB" /* blue */
2527
#define HL_HTML_COLOR "#000000" /* black */

Zend/zend_ini.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#ifndef ZEND_INI_H
2020
#define ZEND_INI_H
2121

22+
#include "zend_result.h"
23+
2224
#define ZEND_INI_USER (1<<0)
2325
#define ZEND_INI_PERDIR (1<<1)
2426
#define ZEND_INI_SYSTEM (1<<2)

Zend/zend_modules.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "zend.h"
2424
#include "zend_compile.h"
2525
#include "zend_build.h"
26+
#include "zend_result.h"
2627

2728
#define INIT_FUNC_ARGS int type, int module_number
2829
#define INIT_FUNC_ARGS_PASSTHRU type, module_number

Zend/zend_multibyte.h

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

23+
#include "zend_result.h"
24+
2325
typedef struct _zend_encoding zend_encoding;
2426

2527
typedef size_t (*zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length);

Zend/zend_operators.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#ifndef ZEND_OPERATORS_H
2222
#define ZEND_OPERATORS_H
2323

24+
#include "zend_result.h"
25+
2426
#include <errno.h>
2527
#include <math.h>
2628
#include <assert.h>

0 commit comments

Comments
 (0)