Browse Source

fix build for pre-5.6

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1489 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
master
Xuefer 7 years ago
parent
commit
71137b9c29
  1. 2
      devel/sample.cpp.php
  2. 8
      lib/Decompiler.class.php
  3. 4
      xcache/xc_compatibility.h

2
devel/sample.cpp.php

@ -44,12 +44,14 @@ abstract class ClassName
static public $static_const10 = array(CONST_VALUE => CONST_VALUE);
static public $static_const11 = array(self::CONST_VALUE => self::CONST_VALUE);
static public $static_const12 = array(ClassName::CONST_VALUE => ClassName::CONST_VALUE);
#if PHP_VERSION >= 560
static public $ast_binop = ClassName::CONST_VALUE + ClassName::CONST_VALUE;
static public $ast_and = ClassName::CONST_VALUE && 1;
static public $ast_or = ClassName::CONST_VALUE || 2;
static public $ast_select = ClassName::CONST_VALUE ? a : b;
static public $ast_unaryPlus = +ClassName::CONST_VALUE;
static public $ast_unaryMinus = -ClassName::CONST_VALUE;
#endif
/** doc */
static public $public_static = array(2, 'str');
/** doc */

8
lib/Decompiler.class.php

@ -648,11 +648,11 @@ class Decompiler
XC_JMP_SET_VAR => "?:",
XC_JMPZ_EX => "&&",
XC_JMPNZ_EX => "||",
// zend_ast
ZEND_BOOL_AND => '&&',
ZEND_BOOL_OR => '||',
);
if (defined('IS_CONSTANT_AST')) {
$this->binops[ZEND_BOOL_AND] = '&&';
$this->binops[ZEND_BOOL_OR] = '||';
}
// }}}
$this->includeTypes = array( // {{{
ZEND_EVAL => 'eval',

4
xcache/xc_compatibility.h

@ -98,6 +98,10 @@ static inline void xc_add_assoc_null_ex(zval *arg, char *key, uint key_len)
#endif
/* }}} */
#ifndef ZEND_ENGINE_2_6
typedef void zend_ast;
#endif
#ifdef ZEND_ENGINE_2_4
# define Z_OP(op) (op)
# define Z_OP_CONSTANT(op) (op).literal->constant

Loading…
Cancel
Save