*data_ptr = &iter->current_val;
}
+#if PHP_VERSION_ID >= 50500
+static void php_pqres_iterator_key(zend_object_iterator *i, zval *key TSRMLS_DC)
+{
+ php_pqres_iterator_t *iter = (php_pqres_iterator_t *) i;
+
+ ZVAL_LONG(key, iter->index);
+}
+#else
static int php_pqres_iterator_key(zend_object_iterator *i, char **key_str, uint *key_len, ulong *key_num TSRMLS_DC)
{
php_pqres_iterator_t *iter = (php_pqres_iterator_t *) i;
return HASH_KEY_IS_LONG;
}
+#endif
static void php_pqres_iterator_invalidate(zend_object_iterator *i TSRMLS_DC)
{