Skip to content

Commit df3a1df

Browse files
committed
Revert "Zend/zend_types.h: move zend_string to zend_string.h"
This reverts commit 02690fe.
1 parent 20c6b14 commit df3a1df

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

Zend/zend_alloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
#ifndef ZEND_ALLOC_H
2222
#define ZEND_ALLOC_H
2323

24-
#include "zend_portability.h"
2524
#include "zend_result.h"
2625

2726
#include <stdio.h>
2827

2928
#include "../TSRM/TSRM.h"
29+
#include "zend.h"
3030

3131
#ifndef ZEND_MM_ALIGNMENT
3232
# error "ZEND_MM_ALIGNMENT was not defined during configure"

Zend/zend_string.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19-
#include "zend_string.h"
2019
#include "zend.h"
2120
#include "zend_globals.h"
2221
#include "zend_rc_debug.h"

Zend/zend_string.h

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,8 @@
1919
#ifndef ZEND_STRING_H
2020
#define ZEND_STRING_H
2121

22-
#include "zend_alloc.h"
22+
#include "zend.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-
};
4224

4325
BEGIN_EXTERN_C()
4426

Zend/zend_types.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,13 @@ 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+
334341
typedef struct _Bucket {
335342
zval val;
336343
zend_ulong h; /* hash value (or numeric index) */
@@ -620,6 +627,13 @@ static zend_always_inline uint8_t zval_get_type(const zval* pz) {
620627

621628
#define IS_CONSTANT_AST_EX (IS_CONSTANT_AST | (IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT))
622629

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+
623637
/* array flags */
624638
#define IS_ARRAY_IMMUTABLE GC_IMMUTABLE
625639
#define IS_ARRAY_PERSISTENT GC_PERSISTENT

0 commit comments

Comments
 (0)