Skip to content

Commit

Permalink
Changes for zend_zval_ptr - PHP 7 has an exported API for it
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Aug 29, 2015
1 parent 0d48c6f commit 75a615b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion xdebug_compat.c
Expand Up @@ -45,14 +45,26 @@
#include "xdebug_compat.h"
#include "zend_extensions.h"

#if PHP_VERSION_ID >= 70000

#include "zend_compile.h"

zval *xdebug_zval_ptr(int op_type, const znode_op *node, zend_execute_data *zdata TSRMLS_DC)
{
zend_free_op should_free;

return zend_get_zval_ptr(op_type, node, zdata, &should_free, BP_VAR_R);
}

#else

#if PHP_VERSION_ID >= 50500
# define T(offset) (*EX_TMP_VAR(zdata, offset))
#else
# define T(offset) (*(temp_variable *)((char*)zdata->Ts + offset))
#endif

zval *xdebug_zval_ptr(int op_type, znode_op *node, zend_execute_data *zdata TSRMLS_DC)
zval *xdebug_zval_ptr(int op_type, const znode_op *node, zend_execute_data *zdata TSRMLS_DC)
{
if (!zdata->opline) {
return NULL;
Expand Down Expand Up @@ -96,3 +108,5 @@ zval *xdebug_zval_ptr(int op_type, znode_op *node, zend_execute_data *zdata TSRM
}
return NULL;
}

#endif

0 comments on commit 75a615b

Please sign in to comment.