mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use better data structures (incomplete)
This commit is contained in:
parent
89a9acea1f
commit
f4cfaf36e2
145 changed files with 21353 additions and 23867 deletions
|
@ -173,16 +173,18 @@ PHPAPI void _mysqlnd_plugin_apply_with_argument(apply_func_arg_t apply_func, voi
|
|||
* zend_hash_apply_with_argument nor zend_hash_internal_pointer_reset and
|
||||
* friends
|
||||
*/
|
||||
uint idx;
|
||||
Bucket *p;
|
||||
int result;
|
||||
|
||||
p = mysqlnd_registered_plugins.pListHead;
|
||||
while (p != NULL) {
|
||||
int result = apply_func(p->pData, argument TSRMLS_CC);
|
||||
for (idx = 0; idx < mysqlnd_registered_plugins.nNumUsed; idx++) {
|
||||
p = mysqlnd_registered_plugins.arData + idx;
|
||||
if (!p->xData) continue;
|
||||
result = apply_func(HASH_DATA(&mysqlnd_registered_plugins, p), argument TSRMLS_CC);
|
||||
|
||||
if (result & ZEND_HASH_APPLY_REMOVE) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "mysqlnd_plugin_apply_with_argument must not remove table entries");
|
||||
}
|
||||
p = p->pListNext;
|
||||
if (result & ZEND_HASH_APPLY_STOP) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue