Created
January 23, 2013 22:41
-
-
Save nikic/4615156 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment