Skip to content

Commit ae6f27b

Browse files
committed
Zend/zend_types.h: move typedefs to to zend_char.h, zend_result.h
1 parent 5cf3bd1 commit ae6f27b

18 files changed

+67
-24
lines changed

Zend/Optimizer/zend_ssa.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "zend_compile.h" // for struct _zend_op
2424
#include "zend_long.h"
2525
#include "zend_portability.h" // for BEGIN_EXTERN_C
26-
#include "zend_types.h" // for zend_result
26+
#include "zend_result.h"
2727

2828
typedef struct _zend_class_entry zend_class_entry;
2929
typedef struct _zend_script zend_script;

Zend/zend_alloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define ZEND_ALLOC_H
2323

2424
#include "zend_portability.h" // for BEGIN_EXTERN_C
25-
#include "zend_types.h" // for zend_result
25+
#include "zend_result.h"
2626

2727
#include <stdbool.h>
2828
#include <stdint.h>

Zend/zend_builtin_functions.h

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

2323
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
#include "zend_types.h" // for zend_result
24+
#include "zend_result.h"
2525

2626
typedef struct _zval_struct zval;
2727

Zend/zend_char.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
+----------------------------------------------------------------------+
3+
| Zend Engine |
4+
+----------------------------------------------------------------------+
5+
| Copyright (c) Zend Technologies Ltd. (http://www.zend.com) |
6+
+----------------------------------------------------------------------+
7+
| This source file is subject to version 2.00 of the Zend license, |
8+
| that is bundled with this package in the file LICENSE, and is |
9+
| available through the world-wide-web at the following url: |
10+
| http://www.zend.com/license/2_00.txt. |
11+
| If you did not receive a copy of the Zend license and are unable to |
12+
| obtain it through the world-wide-web, please send a note to |
13+
| license@zend.com so we can mail you a copy immediately. |
14+
+----------------------------------------------------------------------+
15+
*/
16+
17+
#ifndef ZEND_CHAR_H
18+
#define ZEND_CHAR_H
19+
20+
typedef unsigned char zend_uchar;
21+
22+
#endif /* ZEND_CHAR_H */

Zend/zend_compile.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
#include "zend.h" // for INTERNAL_FUNCTION_PARAMETERS
2424
#include "zend_ast.h"
25+
#include "zend_char.h"
2526
#include "zend_portability.h" //for ZEND_FASTCALL
26-
#include "zend_types.h" // for zend_uchar
2727

2828
#include <stdint.h>
2929

Zend/zend_exceptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include "zend_long.h"
2626
#include "zend_portability.h" // for BEGIN_EXTERN_C
27-
#include "zend_types.h" // for zend_result
27+
#include "zend_result.h"
2828

2929
#include <stdbool.h>
3030

Zend/zend_extensions.h

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

2323
#include "zend_build.h" // for ZEND_TOSTR()
2424
#include "zend_portability.h" // for BEGIN_EXTERN_C
25-
#include "zend_types.h" // for zend_result
25+
#include "zend_result.h"
2626

2727
#include <stddef.h> // for size_t
2828
#include <stdint.h>

Zend/zend_generators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
#ifndef ZEND_GENERATORS_H
2121
#define ZEND_GENERATORS_H
2222

23+
#include "zend_char.h"
2324
#include "zend_compile.h" // for struct _zend_execute_data
2425
#include "zend_portability.h" // for BEGIN_EXTERN_C
25-
#include "zend_types.h" // for zend_uchar
2626

2727
#include <stdint.h>
2828

Zend/zend_highlight.h

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

2323
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
#include "zend_types.h" // for zend_result
24+
#include "zend_result.h"
2525

2626
#define HL_COMMENT_COLOR "#FF8000" /* orange */
2727
#define HL_DEFAULT_COLOR "#0000BB" /* blue */

Zend/zend_ini.h

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

2222
#include "zend_long.h"
2323
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
#include "zend_types.h" // for zend_result
24+
#include "zend_result.h"
2525

2626
#include <stdbool.h>
2727
#include <stdint.h>

Zend/zend_modules.h

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

2323
#include "zend_build.h" // for ZEND_TOSTR()
2424
#include "zend_portability.h" // for BEGIN_EXTERN_C
25-
#include "zend_types.h" // for zend_result
25+
#include "zend_result.h"
2626

2727
#define INIT_FUNC_ARGS int type, int module_number
2828
#define INIT_FUNC_ARGS_PASSTHRU type, module_number

Zend/zend_multibyte.h

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

2323
#include "zend_portability.h" // for BEGIN_EXTERN_C
24-
#include "zend_types.h" // for zend_result
24+
#include "zend_result.h"
2525

2626
#include <stdbool.h>
2727
#include <stddef.h> // for size_t

Zend/zend_operators.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "zend_hash.h" // for zend_hash_num_elements()
2525
#include "zend_object_handlers.h" // for struct _zend_object_handlers
2626
#include "zend_portability.h" // for BEGIN_EXTERN_
27-
#include "zend_types.h" // for zend_result
27+
#include "zend_result.h"
2828
#include "zend_string.h" // for zend_string_copy()
2929

3030
#include <math.h>

Zend/zend_result.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
+----------------------------------------------------------------------+
3+
| Zend Engine |
4+
+----------------------------------------------------------------------+
5+
| Copyright (c) Zend Technologies Ltd. (http://www.zend.com) |
6+
+----------------------------------------------------------------------+
7+
| This source file is subject to version 2.00 of the Zend license, |
8+
| that is bundled with this package in the file LICENSE, and is |
9+
| available through the world-wide-web at the following url: |
10+
| http://www.zend.com/license/2_00.txt. |
11+
| If you did not receive a copy of the Zend license and are unable to |
12+
| obtain it through the world-wide-web, please send a note to |
13+
| license@zend.com so we can mail you a copy immediately. |
14+
+----------------------------------------------------------------------+
15+
*/
16+
17+
#ifndef ZEND_RESULT_H
18+
#define ZEND_RESULT_H
19+
20+
typedef enum {
21+
SUCCESS = 0,
22+
FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */
23+
} ZEND_RESULT_CODE;
24+
25+
typedef ZEND_RESULT_CODE zend_result;
26+
27+
#endif /* ZEND_RESULT_H */

Zend/zend_stream.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
#ifndef ZEND_STREAM_H
2323
#define ZEND_STREAM_H
2424

25+
#include "zend_char.h"
2526
#include "zend_portability.h" // for BEGIN_EXTERN_C
26-
#include "zend_types.h" // for zend_uchar
27+
#include "zend_result.h"
2728

2829
#include <stdbool.h>
2930
#include <stdio.h> // for FILE

Zend/zend_system_id.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define ZEND_SYSTEM_ID_H
1919

2020
#include "zend_portability.h" // for BEGIN_EXTERN_C
21-
#include "zend_types.h" // for ZEND_RESULT_CODE
21+
#include "zend_result.h"
2222

2323
BEGIN_EXTERN_C()
2424
/* True global; Write-only during MINIT/startup */

Zend/zend_types.h

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

25+
#include "zend_char.h"
2526
#include "zend_portability.h"
2627
#include "zend_long.h"
28+
#include "zend_result.h"
2729
#include "zend_type_info.h"
2830

2931
#include <stdbool.h>
@@ -49,15 +51,6 @@
4951
# define ZEND_ENDIAN_LOHI_C_4(a, b, c, d) a, b, c, d
5052
#endif
5153

52-
typedef unsigned char zend_uchar;
53-
54-
typedef enum {
55-
SUCCESS = 0,
56-
FAILURE = -1, /* this MUST stay a negative number, or it may affect functions! */
57-
} ZEND_RESULT_CODE;
58-
59-
typedef ZEND_RESULT_CODE zend_result;
60-
6154
#ifdef ZEND_ENABLE_ZVAL_LONG64
6255
# ifdef ZEND_WIN32
6356
# define ZEND_SIZE_MAX _UI64_MAX

ext/opcache/jit/zend_jit_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
#include "zend_jit.h" // for zend_jit_trace_stack_frame
3333

3434
#include "zend_bitset.h" // for zend_ulong_ntz()
35+
#include "zend_char.h"
3536
#include "zend_compile.h" // for zend_op, ...
3637
#include "zend_constants.h"
3738
#include "zend_long.h"
3839
#include "zend_portability.h" // for zend_always_inline
39-
#include "zend_types.h" // for zend_uchar
4040

4141
#include "Optimizer/zend_call_graph.h" // for struct _zend_func_info
4242
#include "Optimizer/zend_func_info.h" // for zend_func_info

0 commit comments

Comments
 (0)