File tree Expand file tree Collapse file tree 6 files changed +39
-63
lines changed Expand file tree Collapse file tree 6 files changed +39
-63
lines changed Original file line number Diff line number Diff line change 39
39
#include "zend_smart_str_public.h"
40
40
#include "zend_smart_string_public.h"
41
41
#include "zend_signal.h"
42
- #include "zend_type_code.h"
43
42
#include "zend_max_execution_timer.h"
44
43
45
44
#define zend_sprintf sprintf
Original file line number Diff line number Diff line change 28
28
#include "zend_variables.h"
29
29
#include "zend_execute.h"
30
30
#include "zend_type_info.h"
31
- #include "zend_type_code.h"
31
+
32
32
33
33
BEGIN_EXTERN_C ()
34
34
Original file line number Diff line number Diff line change 24
24
#include "zend_compile.h"
25
25
#include "zend_hash.h"
26
26
#include "zend_operators.h"
27
- #include "zend_type_code.h"
28
27
#include "zend_variables.h"
29
28
30
29
#include <stdint.h>
Original file line number Diff line number Diff line change 23
23
24
24
#include "zend.h"
25
25
#include "zend_sort.h"
26
- #include "zend_type_code.h"
27
26
28
27
#define HASH_KEY_IS_STRING 1
29
28
#define HASH_KEY_IS_LONG 2
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 26
26
#include "zend_long.h"
27
27
#include "zend_rc_debug.h"
28
28
#include "zend_result.h"
29
- #include "zend_type_code.h"
30
29
31
30
#include <stdbool.h>
32
31
#include <stdint.h>
@@ -539,10 +538,48 @@ struct _zend_ast_ref {
539
538
/*zend_ast ast; zend_ast follows the zend_ast_ref structure */
540
539
};
541
540
541
+ /* Regular data types: Must be in sync with zend_variables.c. */
542
+ #define IS_UNDEF 0
543
+ #define IS_NULL 1
544
+ #define IS_FALSE 2
545
+ #define IS_TRUE 3
546
+ #define IS_LONG 4
547
+ #define IS_DOUBLE 5
548
+ #define IS_STRING 6
549
+ #define IS_ARRAY 7
550
+ #define IS_OBJECT 8
551
+ #define IS_RESOURCE 9
552
+ #define IS_REFERENCE 10
553
+ #define IS_CONSTANT_AST 11 /* Constant expressions */
554
+
555
+ /* Fake types used only for type hinting.
556
+ * These are allowed to overlap with the types below. */
557
+ #define IS_CALLABLE 12
558
+ #define IS_ITERABLE 13
559
+ #define IS_VOID 14
560
+ #define IS_STATIC 15
561
+ #define IS_MIXED 16
562
+ #define IS_NEVER 17
563
+
564
+ /* internal types */
565
+ #define IS_INDIRECT 12
566
+ #define IS_PTR 13
567
+ #define IS_ALIAS_PTR 14
568
+ #define _IS_ERROR 15
569
+
570
+ /* used for casts */
571
+ #define _IS_BOOL 18
572
+ #define _IS_NUMBER 19
573
+
542
574
static zend_always_inline uint8_t zval_get_type (const zval * pz ) {
543
575
return pz -> u1 .v .type ;
544
576
}
545
577
578
+ #define ZEND_SAME_FAKE_TYPE (faketype , realtype ) ( \
579
+ (faketype) == (realtype) \
580
+ || ((faketype) == _IS_BOOL && ((realtype) == IS_TRUE || (realtype) == IS_FALSE)) \
581
+ )
582
+
546
583
/* we should never set just Z_TYPE, we should set Z_TYPE_INFO */
547
584
#define Z_TYPE (zval ) zval_get_type(&(zval))
548
585
#define Z_TYPE_P (zval_p ) Z_TYPE(*(zval_p))
You can’t perform that action at this time.
0 commit comments