diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-06-18 17:50:27 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-06-18 17:50:27 +0400 |
commit | b108267f2c5c09bd153cfb1d4e580d5fc9c52d51 (patch) | |
tree | bbd4314f096a68cf4ce3a37e35f36ab1b0e641f5 /sapi/phpdbg/phpdbg_utils.h | |
parent | a4f38192ecbbc7ece3a6070b8bac4468e890f476 (diff) | |
parent | eba7c7768553d67d37488f844847d51ec358efff (diff) | |
download | php-git-b108267f2c5c09bd153cfb1d4e580d5fc9c52d51.tar.gz |
Merge branch 'master' into phpng
* master: (41 commits)
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
NEWS
Fix Request #67453 Allow to unserialize empty data.
Update copyright year to 2014
Update copyright year for re2c generated files
Update copyright year to 2014
Update copyright year for re2c files as well
Fix patch for bug #67436
fix failed test
Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function.
Added tests for bug 67436
Fixed wrong XFAIL test - already fixed
Fix typo in Bug #67406 NEWS entry
Fix typo in Bug #67406 NEWS entry
...
Conflicts:
Zend/zend_compile.c
ext/session/session.c
ext/standard/array.c
ext/standard/http_fopen_wrapper.c
tests/classes/bug63462.phpt
Diffstat (limited to 'sapi/phpdbg/phpdbg_utils.h')
-rw-r--r-- | sapi/phpdbg/phpdbg_utils.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_utils.h b/sapi/phpdbg/phpdbg_utils.h index 68ae7e44a3..56bacfc459 100644 --- a/sapi/phpdbg/phpdbg_utils.h +++ b/sapi/phpdbg/phpdbg_utils.h @@ -124,4 +124,24 @@ PHPDBG_API int phpdbg_get_terminal_width(TSRMLS_D); /* }}} */ int phpdbg_rebuild_symtable(TSRMLS_D); +#if PHP_VERSION_ID < 50500 +/* copy from zend_hash.c PHP 5.5 for 5.4 compatibility */ +static void zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, HashPosition *pos) { + Bucket *p; + + p = pos ? (*pos) : ht->pInternalPointer; + + if (!p) { + Z_TYPE_P(key) = IS_NULL; + } else if (p->nKeyLength) { + Z_TYPE_P(key) = IS_STRING; + Z_STRVAL_P(key) = IS_INTERNED(p->arKey) ? (char*)p->arKey : estrndup(p->arKey, p->nKeyLength - 1); + Z_STRLEN_P(key) = p->nKeyLength - 1; + } else { + Z_TYPE_P(key) = IS_LONG; + Z_LVAL_P(key) = p->h; + } +} +#endif + #endif /* PHPDBG_UTILS_H */ |