Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37cebdd

Browse files
remicolletmichael-grunder
authored andcommitted
cleanup code for unsupported versions
1 parent8b51942 commit37cebdd

File tree

3 files changed

+0
-18
lines changed

3 files changed

+0
-18
lines changed

‎backoff.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
#include<ext/random/php_random.h>
77
#endif
88

9-
#ifPHP_VERSION_ID<70100
10-
staticzend_longphp_mt_rand_range(zend_longmin,zend_longmax) {
11-
returnmin+php_rand() % (max-min+1)
12-
}
13-
#endif
14-
159
#include"backoff.h"
1610

1711
staticzend_ulongrandom_range(zend_ulongmin,zend_ulongmax) {

‎library.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,7 @@ static int redis_mbulk_reply_zipped_raw_variant(RedisSock *redis_sock, zval *zre
100100

101101
/* Register a persistent resource in a a way that works for every PHP 7 version. */
102102
voidredis_register_persistent_resource(zend_string*id,void*ptr,intle_id) {
103-
#ifPHP_VERSION_ID<70300
104-
zend_resourceres;
105-
res.type=le_id;
106-
res.ptr=ptr;
107-
108-
zend_hash_str_update_mem(&EG(persistent_list),ZSTR_VAL(id),ZSTR_LEN(id),&res,sizeof(res));
109-
#else
110103
zend_register_persistent_resource(ZSTR_VAL(id),ZSTR_LEN(id),ptr,le_id);
111-
#endif
112104
}
113105

114106
staticConnectionPool*

‎redis_session.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,7 @@ static void lock_release(RedisSock *redis_sock, redis_session_lock_status *lock_
413413
}
414414
}
415415

416-
#ifPHP_VERSION_ID<70300
417-
#defineREDIS_URL_STR(umem) umem
418-
#else
419416
#defineREDIS_URL_STR(umem) ZSTR_VAL(umem)
420-
#endif
421417

422418
/* {{{ PS_OPEN_FUNC
423419
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp