Browse Source

PHP_5_3: support for new zvalue_value.type

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@491 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 14 years ago
parent
commit
94674f8374
  1. 30
      const_string.c
  2. 2
      processor/processor.m4
  3. 3
      xcache.h

30
const_string.c

@ -47,27 +47,7 @@ static const char *const data_type_names[] = {
/* 7 */ "IS_RESOURCE",
/* 8 */ "IS_CONSTANT",
/* 9 */ "IS_CONSTANT_ARRAY",
/* 10 */ "IS_UNICODE",
#if 0
/* 11 */ "",
/* 12 */ "",
/* 13 */ "",
/* 14 */ "",
/* 15 */ "", "", "", "", "",
/* IS_CONSTANT_INDEX */
/* 20 */ "CIDX IS_NULL",
/* 21 */ "CIDX IS_LONG",
/* 22 */ "CIDX IS_DOUBLE",
/* 23 */ "CIDX IS_BOOL",
/* 24 */ "CIDX IS_ARRAY",
/* 25 */ "CIDX IS_OBJECT",
/* 26 */ "CIDX IS_STRING",
/* 27 */ "CIDX IS_RESOURCE",
/* 28 */ "CIDX IS_CONSTANT",
/* 29 */ "CIDX IS_CONSTANT_ARRAY"
/* 20 */ "CIDX IS_UNICODE",
#endif
/* 10 */ "IS_UNICODE"
};
zend_uchar xc_get_data_type_count()
@ -77,13 +57,7 @@ zend_uchar xc_get_data_type_count()
const char *xc_get_data_type(zend_uchar data_type)
{
#if 0
if (data_type & IS_CONSTANT_INDEX) {
data_type = (data_type & ~IS_CONSTANT_INDEX) + 20;
}
#endif
data_type &= ~IS_CONSTANT_INDEX;
return data_type_names[data_type];
return data_type_names[(data_type & IS_CONSTANT_TYPE_MASK)];
}
/* }}} */
/* {{{ xc_get_opcode */

2
processor/processor.m4

@ -95,7 +95,7 @@ DEF_STRUCT_P_FUNC(`zval', , `dnl {{{
/* Variable information */
dnl {{{ zvalue_value
DISABLECHECK(`
switch (src->type & ~IS_CONSTANT_INDEX) {
switch ((Z_TYPE_P(src) & IS_CONSTANT_TYPE_MASK)) {
case IS_LONG:
case IS_RESOURCE:
case IS_BOOL:

3
xcache.h

@ -55,6 +55,9 @@
#ifndef Z_SET_REFCOUNT
# define Z_SET_REFCOUNT(z, rc) (z).refcount = rc;
#endif
#ifndef IS_CONSTANT_TYPE_MASK
# define IS_CONSTANT_TYPE_MASK 0xf
#endif
/* {{{ dirty fix for PHP 6 */
#ifdef add_assoc_long_ex

Loading…
Cancel
Save