public
Created

  • Download Gist
apc_accs2.c
C
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
static zend_property_info* my_copy_property_info(...)
{
...
 
#if defined(ZEND_ENGINE_2_5)
if (src->accs) {
int i;
 
CHECK(dst->accs = (zend_function**) apc_pool_alloc(pool, ZEND_NUM_ACCESSORS * sizeof(zend_function *)));
for (i = 0; i < ZEND_NUM_ACCESSORS; ++i) {
if (src->accs[i]) {
dst->accs[i] = my_copy_function(NULL, src->accs[i], ctxt TSRMLS_CC);
} else {
dst->accs[i] = NULL;
}
}
}
#endif
 
return dst;
}
 
static zend_property_info* my_copy_property_info_for_execution(...)
{
...
 
#if defined(ZEND_ENGINE_2_5)
if (src->accs) {
int i;
 
dst->accs = (zend_function**) ecalloc(ZEND_NUM_ACCESSORS, sizeof(zend_function *));
for (i = 0; i < ZEND_NUM_ACCESSORS; ++i) {
if (src->accs[i]) {
dst->accs[i] = apc_copy_function_for_execution_ex(NULL, src->accs[i], ctxt TSRMLS_CC);
}
}
}
#endif
 
return dst;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.