summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2009-05-25 01:18:00 +0000
committerSara Golemon <pollita@php.net>2009-05-25 01:18:00 +0000
commit00a554b4a3c1ae9c254f230e96837a44f11d4b13 (patch)
treec6a32014918693a57fe8075725b5f57f5ed0c330
parent1c30b43e508438f42822ec5eb41602eaeb2ed8d6 (diff)
downloadphp-git-00a554b4a3c1ae9c254f230e96837a44f11d4b13.tar.gz
MFH(r-1.103) Expand zend_symtable_update_current_key to allow specifying HashPosition
-rw-r--r--Zend/zend_hash.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index 618da2bfa4..e8f2dc99bf 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -367,11 +367,14 @@ static inline int zend_symtable_exists(HashTable *ht, const char *arKey, uint nK
return zend_hash_exists(ht, arKey, nKeyLength);
}
-static inline int zend_symtable_update_current_key(HashTable *ht, const char *arKey, uint nKeyLength, int mode)
+static inline int zend_symtable_update_current_key_ex(HashTable *ht, const char *arKey, uint nKeyLength, int mode, HashPosition *pos)
{
- ZEND_HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_update_current_key_ex(ht, HASH_KEY_IS_LONG, NULL, 0, idx, mode, NULL));
- return zend_hash_update_current_key_ex(ht, HASH_KEY_IS_STRING, arKey, nKeyLength, 0, mode, NULL);
+ ZEND_HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_update_current_key_ex(ht, HASH_KEY_IS_LONG, NULL, 0, idx, mode, pos));
+ return zend_hash_update_current_key_ex(ht, HASH_KEY_IS_STRING, arKey, nKeyLength, 0, mode, pos);
}
+#define zend_symtable_update_current_key(ht,arKey,nKeyLength,mode) \
+ zend_symtable_update_current_key_ex(ht, arKey, nKeyLength, mode, NULL)
+
#endif /* ZEND_HASH_H */