diff options
| author | Marcus Boerger <helly@php.net> | 2003-08-21 00:10:49 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2003-08-21 00:10:49 +0000 |
| commit | 1cf91a7ac5f030a6e0e2cf2dec646dee2ad507d5 (patch) | |
| tree | 11bd214615e2c7fdaef3f86d0710c070e5fe1878 /ext/spl/spl_engine.h | |
| parent | bef97f89a365b5df7b9168ce5abf9ffac5d6c8fb (diff) | |
| download | php-git-1cf91a7ac5f030a6e0e2cf2dec646dee2ad507d5.tar.gz | |
Extensions that do opcode hooking must provide the removed functions/macros
themselves now.
Diffstat (limited to 'ext/spl/spl_engine.h')
| -rwxr-xr-x | ext/spl/spl_engine.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h index e4c0e93a4a..19f4ccc83b 100755 --- a/ext/spl/spl_engine.h +++ b/ext/spl/spl_engine.h @@ -23,7 +23,6 @@ #include "php_spl.h" #include "zend_compile.h" -#include "zend_execute_locks.h" #undef EX #define EX(element) execute_data->element @@ -76,6 +75,26 @@ typedef enum { spl_is_a spl_implements(zend_class_entry *ce); +/* Use this only insode OPCODE-Hooks */ +static inline void spl_pzval_unlock_func(zval *z TSRMLS_DC) +{ + z->refcount--; + if (!z->refcount) { + z->refcount = 1; + z->is_ref = 0; + EG(garbage)[EG(garbage_ptr)++] = z; + } +} + +/* Use this only insode OPCODE-Hooks */ +static inline void spl_pzval_lock_func(zval *z) +{ + z->refcount++; +} + +/* Use this only insode OPCODE-Hooks */ +#define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!((pzn)->u.EA.type & EXT_TYPE_UNUSED)) { spl_pzval_lock_func(pzv); } + #endif /* SPL_ENGINE_H */ /* |
