Skip to content

Commit f760b13

Browse files
committed
Revert "Zend/zend_type_code.h: convert to enum"
This reverts commit b98f18e.
1 parent a31fe72 commit f760b13

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed

Zend/zend_type_code.h

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,38 @@
1717
#ifndef ZEND_TYPE_CODE_H
1818
#define ZEND_TYPE_CODE_H
1919

20-
enum {
21-
/* Regular data types: Must be in sync with zend_variables.c. */
22-
IS_UNDEF = 0,
23-
IS_NULL = 1,
24-
IS_FALSE = 2,
25-
IS_TRUE = 3,
26-
IS_LONG = 4,
27-
IS_DOUBLE = 5,
28-
IS_STRING = 6,
29-
IS_ARRAY = 7,
30-
IS_OBJECT = 8,
31-
IS_RESOURCE = 9,
32-
IS_REFERENCE = 10,
33-
IS_CONSTANT_AST = 11, /* Constant expressions */
20+
/* Regular data types: Must be in sync with zend_variables.c. */
21+
#define IS_UNDEF 0
22+
#define IS_NULL 1
23+
#define IS_FALSE 2
24+
#define IS_TRUE 3
25+
#define IS_LONG 4
26+
#define IS_DOUBLE 5
27+
#define IS_STRING 6
28+
#define IS_ARRAY 7
29+
#define IS_OBJECT 8
30+
#define IS_RESOURCE 9
31+
#define IS_REFERENCE 10
32+
#define IS_CONSTANT_AST 11 /* Constant expressions */
3433

35-
/* Fake types used only for type hinting.
36-
* These are allowed to overlap with the types below. */
37-
IS_CALLABLE = 12,
38-
IS_ITERABLE = 13,
39-
IS_VOID = 14,
40-
IS_STATIC = 15,
41-
IS_MIXED = 16,
42-
IS_NEVER = 17,
34+
/* Fake types used only for type hinting.
35+
* These are allowed to overlap with the types below. */
36+
#define IS_CALLABLE 12
37+
#define IS_ITERABLE 13
38+
#define IS_VOID 14
39+
#define IS_STATIC 15
40+
#define IS_MIXED 16
41+
#define IS_NEVER 17
4342

44-
/* internal types */
45-
IS_INDIRECT = 12,
46-
IS_PTR = 13,
47-
IS_ALIAS_PTR = 14,
48-
_IS_ERROR = 15,
43+
/* internal types */
44+
#define IS_INDIRECT 12
45+
#define IS_PTR 13
46+
#define IS_ALIAS_PTR 14
47+
#define _IS_ERROR 15
4948

50-
/* used for casts */
51-
_IS_BOOL = 18,
52-
_IS_NUMBER = 19,
53-
};
49+
/* used for casts */
50+
#define _IS_BOOL 18
51+
#define _IS_NUMBER 19
5452

5553
#define ZEND_SAME_FAKE_TYPE(faketype, realtype) ( \
5654
(faketype) == (realtype) \

0 commit comments

Comments
 (0)