8000 Merge pull request #660 from Jan-E/php7 · jrtkcoder/phpredis@ea98401 · GitHub
[go: up one dir, main page]

Skip to content

Commit ea98401

Browse files
Merge pull request phpredis#660 from Jan-E/php7
VC14 fixes (2) and a test fix
2 parents 3159bd2 + c5fd1cf commit ea98401

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

config.w32

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ ARG_ENABLE("redis-igbinary", "whether to enable igbinary serializer support", "n
77
if (PHP_REDIS != "no") {
88
var sources = "redis.c redis_commands.c library.c redis_session.c redis_array.c redis_array_impl.c redis_cluster.c cluster_library.c";
99
if (PHP_REDIS_SESSION != "no") {
10-
ADD_SOURCES(configure_module_dirname, "redis_session.c", "redis");
1110
ADD_EXTENSION_DEP("redis", "session");
1211
ADD_FLAG("CFLAGS_REDIS", ' /D PHP_SESSION=1 ');
1312
AC_DEFINE("HAVE_REDIS_SESSION", 1);

library.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
/* This proto is available from 5.5 on only */
3535
PHP_REDIS_API int usleep(unsigned int useconds);
3636
# endif
37+
# if PHP_MAJOR_VERSION >= 7
38+
PHP_REDIS_API int usleep(unsigned int useconds);
39+
# endif
3740
#endif
3841

3942
extern zend_class_entry *redis_ce;

redis_commands.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
};
1212
int gettimeofday(struct timeval *tv, struct timezone *tz);
1313
# endif
14-
# if defined(HAVE_USLEEP)
15-
int usleep(unsigned int useconds);
16-
# endif
1714
#endif
1815

1916
#include "common.h"

tests/RedisTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ public function testBRpopLpush() {
19201920

19211921
public function testZAddFirstArg() {
19221922

1923-
$this->redis->del('key');
1923+
$this->redis->del('100');
19241924

19251925
$zsetName = 100; // not a string!
19261926
$this->assertTrue(1 === $this->redis->zAdd($zsetName, 0, 'val0'));

0 commit comments

Comments
 (0)
0