File tree Expand file tree Collapse file tree 4 files changed +21
-16
lines changed
Expand file tree Collapse file tree 4 files changed +21
-16
lines changed Original file line number Diff line number Diff line change 2121#ifndef ZEND_ALLOC_H
2222#define ZEND_ALLOC_H
2323
24+ #include "zend_portability.h"
2425#include "zend_result.h"
2526
2627#include <stdio.h>
2728
2829#include "../TSRM/TSRM.h"
29- #include "zend.h"
3030
3131#ifndef ZEND_MM_ALIGNMENT
3232# error "ZEND_MM_ALIGNMENT was not defined during configure"
Original file line number Diff line number Diff line change 1616 +----------------------------------------------------------------------+
1717*/
1818
19+ #include "zend_string.h"
1920#include "zend.h"
2021#include "zend_globals.h"
2122#include "zend_rc_debug.h"
Original file line number Diff line number Diff line change 1919#ifndef ZEND_STRING_H
2020#define ZEND_STRING_H
2121
22- #include "zend .h"
22+ #include "zend_alloc .h"
2323#include "zend_char.h"
24+ #include "zend_portability.h"
25+ #include "zend_refcounted.h"
26+
27+ /* string flags (zval.value->gc.u.flags) */
28+ #define IS_STR_CLASS_NAME_MAP_PTR GC_PROTECTED /* refcount is a map_ptr offset of class_entry */
29+ #define IS_STR_INTERNED GC_IMMUTABLE /* interned string */
30+ #define IS_STR_PERSISTENT GC_PERSISTENT /* allocated using malloc */
31+ #define IS_STR_PERMANENT (1<<8) /* relives request boundary */
32+ #define IS_STR_VALID_UTF8 (1<<9) /* valid UTF-8 according to PCRE */
33+
34+ typedef struct _zend_string zend_string ;
35+
36+ struct _zend_string {
37+ zend_refcounted_h gc ;
38+ zend_ulong h ; /* hash value */
39+ size_t len ;
40+ char val [1 ];
41+ };
2442
2543BEGIN_EXTERN_C ()
2644
Original file line number Diff line number Diff line change @@ -331,13 +331,6 @@ struct _zval_struct {
331331 } u2 ;
332332};
333333
334- struct _zend_string {
335- zend_refcounted_h gc ;
336- zend_ulong h ; /* hash value */
337- size_t len ;
338- char val [1 ];
339- };
340-
341334typedef struct _Bucket {
342335 zval val ;
343336 zend_ulong h ; /* hash value (or numeric index) */
@@ -627,13 +620,6 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) {
627620
628621#define IS_CONSTANT_AST_EX (IS_CONSTANT_AST | (IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT))
629622
630- /* string flags (zval.value->gc.u.flags) */
631- #define IS_STR_CLASS_NAME_MAP_PTR GC_PROTECTED /* refcount is a map_ptr offset of class_entry */
632- #define IS_STR_INTERNED GC_IMMUTABLE /* interned string */
633- #define IS_STR_PERSISTENT GC_PERSISTENT /* allocated using malloc */
634- #define IS_STR_PERMANENT (1<<8) /* relives request boundary */
635- #define IS_STR_VALID_UTF8 (1<<9) /* valid UTF-8 according to PCRE */
636-
637623/* array flags */
638624#define IS_ARRAY_IMMUTABLE GC_IMMUTABLE
639625#define IS_ARRAY_PERSISTENT GC_PERSISTENT
You can’t perform that action at this time.
0 commit comments