Browse Source

1.2->1.1: backport [218] [248]

git-svn-id: svn://svn.lighttpd.net/xcache/branches/1.1@252 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.1
Xuefer 15 years ago
parent
commit
7414e215f0
  1. 18
      processor/processor.m4

18
processor/processor.m4

@ -159,7 +159,7 @@ DEF_STRUCT_P_FUNC(`zval_ptr', , `dnl {{{
IFCOPY(`
dst[0] = *ppzv;
/* *dst is updated */
dnl fprintf(stderr, "*dst is set to %p\n", dst[0]);
dnl fprintf(stderr, "*dst is set to %p, KIND is_shm %d\n", dst[0], xc_is_shm(dst[0]));
')
IFSTORE(`assert(xc_is_shm(dst[0]));')
IFRESTORE(`assert(!xc_is_shm(dst[0]));')
@ -176,6 +176,7 @@ DEF_STRUCT_P_FUNC(`zval_ptr', , `dnl {{{
zval_ptr pzv = (zval_ptr)-1;
', `
zval_ptr pzv = dst[0];
FIXPOINTER_EX(zval, pzv)
')
if (zend_hash_add(&processor->zvalptrs, (char *)src[0], sizeof(src[0]), (void*)&pzv, sizeof(pzv), NULL) == SUCCESS) {
/* first add, go on */
@ -190,6 +191,7 @@ DEF_STRUCT_P_FUNC(`zval_ptr', , `dnl {{{
dnl fprintf(stderr, "copy from %p to %p\n", src[0], dst[0]);
')
STRUCT_P_EX(zval, dst[0], src[0], `[0]', `', ` ')
FIXPOINTER_EX(zval, dst[0])
} while (0);
')
DONE_SIZE(sizeof(zval_ptr))
@ -215,7 +217,11 @@ DEF_STRUCT_P_FUNC(`zend_constant', , `dnl {{{
STRUCT(zval, value)
DISPATCH(int, flags)
DISPATCH(uint, name_len)
pushdef(`emalloc', `malloc($1)')
pushdef(`ecalloc', `calloc($1, $2)')
PROC_ZSTRING_L(, name, name_len)
popdef(`ecalloc')
popdef(`emalloc')
DISPATCH(int, module_number)
')
dnl }}}
@ -710,16 +716,6 @@ DEF_STRUCT_P_FUNC(`xc_entry_data_php_t', , `dnl {{{
')
dnl }}}
DEF_STRUCT_P_FUNC(`xc_entry_data_var_t', , `dnl {{{
IFSTORE(`
if (processor->reference) {
if (zend_hash_add(&processor->zvalptrs, (char *)&src->value, sizeof(&src->value), (void*)&src->value, sizeof(src->value), NULL) == SUCCESS) {
dnl fprintf(stderr, "mark[%p] = %p\n", &src->value, &dst->value);
}
else {
assert(0);
}
}
')
STRUCT_P_EX(zval_ptr, dst->value, src->value, `value', `', `&')
DONE(value)
')

Loading…
Cancel
Save