Skip to content

Commit

Permalink
compilation fixed for php4
Browse files Browse the repository at this point in the history
  • Loading branch information
zenovich committed May 27, 2014
1 parent 5e179e9 commit 5d92c20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runkit_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ void php_runkit_function_copy_ctor(zend_function *fe, const char *newname, int n
#endif
#if PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1)
zend_compiled_variable *dupvars;
zend_op *last_op;
#endif
zend_op *opcode_copy, *last_op;
zend_op *opcode_copy;
int i;

if (newname) {
Expand Down Expand Up @@ -178,7 +179,9 @@ void php_runkit_function_copy_ctor(zend_function *fe, const char *newname, int n
#endif

opcode_copy = safe_emalloc(sizeof(zend_op), fe->op_array.last, 0);
#ifdef ZEND_ENGINE_2
last_op = fe->op_array.opcodes + fe->op_array.last;
#endif
for(i = 0; i < fe->op_array.last; i++) {
opcode_copy[i] = fe->op_array.opcodes[i];
#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4) || (PHP_MAJOR_VERSION < 5)
Expand Down

0 comments on commit 5d92c20

Please sign in to comment.