MFH(r-1.103) Expand zend_symtable_update_current_key to allow specifying HashPosition

This commit is contained in:
Sara Golemon 2009-05-25 01:18:00 +00:00
parent 1c30b43e50
commit 00a554b4a3

View file

@ -367,11 +367,14 @@ static inline int zend_symtable_exists(HashTable *ht, const char *arKey, uint nK
return zend_hash_exists(ht, arKey, nKeyLength); 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)); 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, NULL); 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 */ #endif /* ZEND_HASH_H */