Permalink
Browse files

Use another NULL for zend_is_callable_ex

Given that PHP 5.2.X and PHP 5.3.X use a different signature
for zend_is_callable_ex, and we're not using the error return
(PHP 5.3.X) anyway, just pass in NULL.

Addresses issue #318
  • Loading branch information...
1 parent d287163 commit 8596eac45e1f6defc4036fac9375487e8abc63e7 @michael-grunder michael-grunder committed Mar 20, 2013
Showing with 3 additions and 4 deletions.
  1. +3 −4 redis_array_impl.c
View
@@ -288,12 +288,12 @@ ra_make_array(HashTable *hosts, zval *z_fun, zval *z_dist, HashTable *hosts_prev
char *
ra_call_extractor(RedisArray *ra, const char *key, int key_len, int *out_len TSRMLS_DC) {
- char *error = NULL, *out;
+ char *out;
zval z_ret;
zval *z_argv0;
/* check that we can call the extractor function */
- if(!zend_is_callable_ex(ra->z_fun, NULL, 0, NULL, NULL, NULL, &error TSRMLS_CC)) {
+ if(!zend_is_callable_ex(ra->z_fun, NULL, 0, NULL, NULL, NULL, NULL TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not call extractor function");
return NULL;
}
@@ -349,12 +349,11 @@ ra_extract_key(RedisArray *ra, const char *key, int key_len, int *out_len TSRMLS
zend_bool
ra_call_distributor(RedisArray *ra, const char *key, int key_len, int *pos TSRMLS_DC) {
- char *error = NULL;
zval z_ret;
zval *z_argv0;
/* check that we can call the extractor function */
- if(!zend_is_callable_ex(ra->z_dist, NULL, 0, NULL, NULL, NULL, &error TSRMLS_CC)) {
+ if(!zend_is_callable_ex(ra->z_dist, NULL, 0, NULL, NULL, NULL, NULL TSRMLS_CC)) {
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not call distributor function");
return 0;
}

0 comments on commit 8596eac

Please sign in to comment.