File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 33
33
#define zend_accel_memdup (p , size ) \
34
34
_zend_shared_memdup((void*)p, size, 0)
35
35
36
+ #ifdef HAVE_OPCACHE_FILE_CACHE
37
+ #define zend_set_str_gc_flags (str ) do { \
38
+ if (ZCG(accel_directives).file_cache_only) { \
39
+ GC_FLAGS(str) = IS_STR_INTERNED; \
40
+ } else { \
41
+ GC_FLAGS(str) = IS_STR_INTERNED | IS_STR_PERMANENT; \
42
+ } \
43
+ } while (0)
44
+ #else
45
+ #define zend_set_str_gc_flags (str ) GC_FLAGS(str) = IS_STR_INTERNED | IS_STR_PERMANENT
46
+ #endif
47
+
36
48
#define zend_accel_store_string (str ) do { \
37
49
zend_string *new_str = zend_shared_alloc_get_xlat_entry(str); \
38
50
if (new_str) { \
43
55
zend_string_release(str); \
44
56
str = new_str; \
45
57
zend_string_hash_val(str); \
46
- GC_FLAGS (str) = IS_STR_INTERNED | IS_STR_PERMANENT ; \
58
+ zend_set_str_gc_flags (str); \
47
59
} \
48
60
} while (0)
49
61
#define zend_accel_memdup_string (str ) do { \
50
62
str = zend_accel_memdup(str, _ZSTR_STRUCT_SIZE(ZSTR_LEN(str))); \
51
63
zend_string_hash_val(str); \
52
- GC_FLAGS (str) = IS_STR_INTERNED | IS_STR_PERMANENT ; \
64
+ zend_set_str_gc_flags (str); \
53
65
} while (0)
54
66
#define zend_accel_store_interned_string (str ) do { \
55
67
if (!IS_ACCEL_INTERNED(str)) { \
You can’t perform that action at this time.
0 commit comments