Skip to content

Commit

Permalink
More fixes for PHP 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasff committed Mar 12, 2012
1 parent 9577b82 commit 32e8d41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions redis_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ PHP_METHOD(RedisArray, __construct)

if(ra) {
ra->auto_rehash = b_autorehash;
#if PHP_VERSION_ID >= 50400
id = zend_list_insert(ra, le_redis_array TSRMLS_CC);
#else
id = zend_list_insert(ra, le_redis_array);
#endif
add_property_resource(getThis(), "socket", id);
}
}
Expand Down
4 changes: 4 additions & 0 deletions redis_array_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts TSRMLS_DC)
redis_sock_server_open(redis_sock, 1 TSRMLS_CC);

/* attach */
#if PHP_VERSION_ID >= 50400
id = zend_list_insert(redis_sock, le_redis_sock TSRMLS_CC);
#else
id = zend_list_insert(redis_sock, le_redis_sock);
#endif
add_property_resource(ra->redis[i], "socket", id);
}

Expand Down

0 comments on commit 32e8d41

Please sign in to comment.