Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 672dec8

Browse files
remicolletmichael-grunder
authored andcommitted
Fix #1956 bad type usage on 32-bit
1 parent ab25ae7 commit 672dec8

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2905,7 +2905,7 @@ redis_unpack(RedisSock *redis_sock, const char *val, int val_len, zval *z_ret)
29052905
#ifdef HAVE_REDIS_ZSTD
29062906
{
29072907
char *data;
2908-
size_t len;
2908+
unsigned long long len;
29092909

29102910
len = ZSTD_getFrameContentSize(val, val_len);
29112911

redis_array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ PHP_METHOD(RedisArray, __construct)
226226
RedisArray *ra = NULL;
227227
zend_bool b_index = 0, b_autorehash = 0, b_pconnect = 0, consistent = 0;
228228
HashTable *hPrev = NULL, *hOpts = NULL;
229-
long l_retry_interval = 0;
229+
zend_long l_retry_interval = 0;
230230
zend_bool b_lazy_connect = 0;
231231
double d_connect_timeout = 0, read_timeout = 0.0;
232232
zend_string *algorithm = NULL, *user = NULL, *pass = NULL;
@@ -278,7 +278,7 @@ PHP_METHOD(RedisArray, __construct)
278278
}
279279

280280
ra = ra_make_array(Z_ARRVAL_P(z0), &z_fun, &z_dist, hPrev, b_index,
281-
b_pconnect, l_retry_interval, b_lazy_connect,
281+
b_pconnect, (long)l_retry_interval, b_lazy_connect,
282282
d_connect_timeout, read_timeout, consistent,
283283
algorithm, user, pass);
284284

redis_array_impl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ RedisArray *ra_load_array(const char *name) {
158158

159159
zend_string *algorithm = NULL, *user = NULL, *pass = NULL;
160160
zend_bool b_index = 0, b_autorehash = 0, b_pconnect = 0, consistent = 0;
161-
long l_retry_interval = 0;
161+
zend_long l_retry_interval = 0;
162162
zend_bool b_lazy_connect = 0;
163163
double d_connect_timeout = 0, read_timeout = 0.0;
164164
HashTable *hHosts = NULL, *hPrev = NULL;
@@ -291,7 +291,7 @@ RedisArray *ra_load_array(const char *name) {
291291
}
292292

293293
/* create RedisArray object */
294-
ra = ra_make_array(hHosts, &z_fun, &z_dist, hPrev, b_index, b_pconnect, l_retry_interval,
294+
ra = ra_make_array(hHosts, &z_fun, &z_dist, hPrev, b_index, b_pconnect, (long)l_retry_interval,
295295
b_lazy_connect, d_connect_timeout, read_timeout, consistent, algorithm,
296296
user, pass);
297297
if (ra) {

0 commit comments

Comments
 (0)