Skip to content

Commit

Permalink
rename IS_CALLABLE to MEMCACHE_IS_CALLABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrejoye committed Oct 9, 2013
1 parent 5a026e5 commit fc76c47
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions memcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ static void php_mmc_failure_callback(mmc_pool_t *pool, mmc_t *mmc, void *param T

/* check for userspace callback */
if (param != NULL && zend_hash_find(Z_OBJPROP_P((zval *)param), "_failureCallback", sizeof("_failureCallback"), (void **)&callback) == SUCCESS && Z_TYPE_PP(callback) != IS_NULL) {
if (IS_CALLABLE(*callback, 0, NULL)) {
if (MEMCACHE_IS_CALLABLE(*callback, 0, NULL)) {
zval *retval = NULL;
zval *host, *tcp_port, *udp_port, *error, *errnum;
zval **params[5];
Expand Down Expand Up @@ -1233,7 +1233,7 @@ PHP_FUNCTION(memcache_add_server)
}

if (failure_callback != NULL && Z_TYPE_P(failure_callback) != IS_NULL) {
if (!IS_CALLABLE(failure_callback, 0, NULL)) {
if (!MEMCACHE_IS_CALLABLE(failure_callback, 0, NULL)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid failure callback");
RETURN_FALSE;
}
Expand Down Expand Up @@ -1295,7 +1295,7 @@ PHP_FUNCTION(memcache_set_server_params)
}

if (failure_callback != NULL && Z_TYPE_P(failure_callback) != IS_NULL) {
if (!IS_CALLABLE(failure_callback, 0, NULL)) {
if (!MEMCACHE_IS_CALLABLE(failure_callback, 0, NULL)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid failure callback");
RETURN_FALSE;
}
Expand Down Expand Up @@ -1360,7 +1360,7 @@ PHP_FUNCTION(memcache_set_failure_callback)
}

if (Z_TYPE_P(failure_callback) != IS_NULL) {
if (!IS_CALLABLE(failure_callback, 0, NULL)) {
if (!MEMCACHE_IS_CALLABLE(failure_callback, 0, NULL)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid failure callback");
RETURN_FALSE;
}
Expand Down
2 changes: 1 addition & 1 deletion memcache_binary_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ static int mmc_binary_store(
}

mmc_pack_header(&(header->base), op, 0, key_len, sizeof(*header) - sizeof(header->base), request->sendbuf.value.len - valuelen);

header->cas = htonll(cas);
header->flags = htonl(flags);
header->exptime = htonl(exptime);
Expand Down
4 changes: 2 additions & 2 deletions php_memcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ PHP_FUNCTION(memcache_flush);
#define MMC_DEFAULT_CACHEDUMP_LIMIT 100 /* number of entries */

#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION >= 3)
# define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp) TSRMLS_CC)
# define MEMCACHE_IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp) TSRMLS_CC)
#else
# define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp))
# define MEMCACHE_IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp))
#endif

/* internal functions */
Expand Down

0 comments on commit fc76c47

Please sign in to comment.