1233
1233
unsigned int tablekey_len;
1235
1235
unsigned long idx;
1236
zval **z_key_pp, **z_value_pp;
1236
zval *z_key_p, *z_value_p;
1238
1238
zend_hash_get_current_key_ex(keytable, &tablekey, &tablekey_len, &idx, 0, NULL);
1239
if(zend_hash_get_current_data(keytable, (void**)&z_key_pp) == FAILURE) {
1239
if ((z_key_p = zend_hash_get_current_data(keytable)) == NULL) {
1240
1240
continue; /* this should never happen, according to the PHP people. */
1243
1243
/* get current value, a key */
1244
convert_to_string(*z_key_pp);
1245
hkey = Z_STRVAL_PP(z_key_pp);
1246
hkey_len = Z_STRLEN_PP(z_key_pp);
1244
convert_to_string(z_key_p);
1245
hkey = Z_STRVAL_P(z_key_p);
1246
hkey_len = Z_STRLEN_P(z_key_p);
1248
1248
/* move forward */
1249
1249
zend_hash_move_forward(keytable);
1251
1251
/* fetch again */
1252
1252
zend_hash_get_current_key_ex(keytable, &tablekey, &tablekey_len, &idx, 0, NULL);
1253
if(zend_hash_get_current_data(keytable, (void**)&z_value_pp) == FAILURE) {
1253
if ((z_value_p = zend_hash_get_current_data(keytable)) == NULL) {
1254
1254
continue; /* this should never happen, according to the PHP people. */
1257
1257
/* get current value, a hash value now. */
1258
hval = Z_STRVAL_PP(z_value_pp);
1258
hval = Z_STRVAL_P(z_value_p);
1260
1260
/* Decode the score depending on flag */
1261
if (decode == SCORE_DECODE_INT && Z_STRLEN_PP(z_value_pp) > 0) {
1261
if (decode == SCORE_DECODE_INT && Z_STRLEN_P(z_value_p) > 0) {
1262
1262
add_assoc_long_ex(z_ret, hkey, 1+hkey_len, atoi(hval+1));
1263
1263
} else if (decode == SCORE_DECODE_DOUBLE) {
1264
1264
add_assoc_double_ex(z_ret, hkey, 1+hkey_len, atof(hval));
1266
1266
zval *z = NULL;
1267
1267
MAKE_STD_ZVAL(z);
1269
1269
zval_copy_ctor(z);
1270
1270
add_assoc_zval_ex(z_ret, hkey, 1+hkey_len, z);