1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
From 244473d2bca7aff7ce24a58651ab8a261669d99d Mon Sep 17 00:00:00 2001
From: krakjoe <joe.watkins@live.co.uk>
Date: Sun, 8 Jun 2014 17:40:36 +0100
Subject: [PATCH] fix #73
---
apc_bin.c | 1 -
apc_cache.c | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/apc_bin.c b/apc_bin.c
index 00f7160..a8f705c 100644
--- a/apc_bin.c
+++ b/apc_bin.c
@@ -235,7 +235,6 @@ static void apc_swizzle_zval(apc_bd_t *bd, apc_context_t* ctxt, zend_llist *ll,
apc_swizzle_ptr(bd, ctxt, ll, &zv->value.str.val);
break;
case IS_ARRAY:
- case IS_CONSTANT_ARRAY:
apc_swizzle_hashtable(bd, ctxt, ll, zv->value.ht, (apc_swizzle_cb_t)apc_swizzle_zval, 1 TSRMLS_CC);
apc_swizzle_ptr(bd, ctxt, ll, &zv->value.ht);
break;
diff --git a/apc_cache.c b/apc_cache.c
index b82611d..e0e53df 100644
--- a/apc_cache.c
+++ b/apc_cache.c
@@ -1001,9 +1001,8 @@ PHP_APCU_API zend_bool apc_cache_update(apc_cache_t* cache, char *strkey, zend_u
if ((h == (*slot)->key.h) &&
!memcmp((*slot)->key.str, strkey, keylen)) {
/* attempt to perform update */
- switch(Z_TYPE_P((*slot)->value->val) & ~IS_CONSTANT_INDEX) {
+ switch(Z_TYPE_P((*slot)->value->val) & ~IS_CONSTANT_TYPE_MASK) {
case IS_ARRAY:
- case IS_CONSTANT_ARRAY:
case IS_OBJECT:
{
if(cache->serializer) {
@@ -1124,7 +1123,7 @@ static zval* my_serialize_object(zval* dst, const zval* src, apc_context_t* ctxt
}
if(serialize((unsigned char**)&buf.c, &buf.len, src, config TSRMLS_CC)) {
- dst->type = src->type & ~IS_CONSTANT_INDEX;
+ dst->type = src->type & ~IS_CONSTANT;
dst->value.str.len = buf.len;
CHECK(dst->value.str.val = apc_pmemcpy(buf.c, (buf.len + 1), pool TSRMLS_CC));
}
@@ -1357,7 +1356,6 @@ static APC_HOTSPOT zval* my_copy_zval(zval* dst, const zval* src, apc_context_t*
break;
case IS_ARRAY:
- case IS_CONSTANT_ARRAY:
if(ctxt->serializer == NULL) {
CHECK(dst->value.ht =
--
1.9.3
|