Skip to content

Commit ba504c7

Browse files
committed
fix build on windows for PHP 7.4
Change-Id: Ia506f77f61abe116356ec7802ccd91fc4d647c1e Reviewed-on: http://review.couchbase.org/121248 Tested-by: Build Bot <[email protected]> Reviewed-by: Sergey Avseyev <[email protected]>
1 parent 7ec2ff3 commit ba504c7

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

couchbase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ typedef struct {
708708

709709
typedef struct {
710710
char *str;
711-
uint len;
711+
unsigned len;
712712
} pcbc_pp_id;
713713

714714
typedef struct {

paramparser.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static zend_always_inline int pcbc_get_parameters_array_ex(int param_count, PCBC
4848

4949
#if PHP_VERSION_ID >= 70000
5050
#define PCBC_HASH_GET_CURRENT_DATA_EX(ht, pos) zend_hash_get_current_data_ex(ht, pos)
51-
static zend_always_inline int pcbc_hash_str_get_current_key_ex(HashTable *ht, char **str, uint *len,
51+
static zend_always_inline int pcbc_hash_str_get_current_key_ex(HashTable *ht, char **str, unsigned *len,
5252
zend_ulong *num_index, HashPosition *pos)
5353
{
5454
zend_string *zstr = NULL;
@@ -72,10 +72,10 @@ static zend_always_inline PCBC_ZVAL *pcbc_hash_get_current_data_ex(HashTable *ht
7272
return result;
7373
}
7474
#define PCBC_HASH_GET_CURRENT_DATA_EX(ht, pos) pcbc_hash_get_current_data_ex(ht, pos)
75-
static zend_always_inline int pcbc_hash_str_get_current_key_ex(HashTable *ht, char **str, uint *len,
75+
static zend_always_inline int pcbc_hash_str_get_current_key_ex(HashTable *ht, char **str, unsigned *len,
7676
zend_ulong *num_index, HashPosition *pos)
7777
{
78-
uint len_out = 0;
78+
unsigned len_out = 0;
7979
int key_type = zend_hash_get_current_key_ex(ht, str, &len_out, num_index, 0, pos);
8080
if (len != NULL) {
8181
*len = len_out - 1;
@@ -252,7 +252,7 @@ int pcbc_pp_next(pcbc_pp_state *state)
252252
PCBC_ZVAL *data;
253253
zend_ulong keyidx, key_type;
254254
char *keystr;
255-
uint keystr_len;
255+
unsigned keystr_len;
256256

257257
data = PCBC_HASH_GET_CURRENT_DATA_EX(hash, &state->hash_pos);
258258
if (data == 0) {

src/couchbase/analytics_query.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ PHP_METHOD(AnalyticsQuery, namedParams)
120120
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(params), (void **)&entry, &pos) == SUCCESS) {
121121
if (zend_hash_get_current_key_type_ex(Z_ARRVAL_P(params), &pos) == HASH_KEY_IS_STRING) {
122122
char *key = NULL, *prefixed_key = NULL;
123-
uint key_len = 0;
123+
unsigned key_len = 0;
124124
zend_hash_get_current_key_ex(Z_ARRVAL_P(params), &key, &key_len, NULL, 0, &pos);
125125
spprintf(&prefixed_key, 0, "$%s", key);
126126
add_assoc_zval(options, prefixed_key, *entry);

src/couchbase/n1ql_query.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ PHP_METHOD(N1qlQuery, namedParams)
110110
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(params), (void **)&entry, &pos) == SUCCESS) {
111111
if (zend_hash_get_current_key_type_ex(Z_ARRVAL_P(params), &pos) == HASH_KEY_IS_STRING) {
112112
char *key = NULL, *prefixed_key = NULL;
113-
uint key_len = 0;
113+
unsigned key_len = 0;
114114
zend_hash_get_current_key_ex(Z_ARRVAL_P(params), &key, &key_len, NULL, 0, &pos);
115115
spprintf(&prefixed_key, 0, "$%s", key);
116116
add_assoc_zval(options, prefixed_key, *entry);

src/couchbase/spatial_view_query.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ PHP_METHOD(SpatialViewQuery, custom)
305305
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(custom_options), (void **)&entry, &pos) == SUCCESS) {
306306
if (zend_hash_get_current_key_type_ex(Z_ARRVAL_P(custom_options), &pos) == HASH_KEY_IS_STRING) {
307307
char *key = NULL;
308-
uint key_len = 0;
308+
unsigned key_len = 0;
309309
zend_hash_get_current_key_ex(Z_ARRVAL_P(custom_options), &key, &key_len, NULL, 0, &pos);
310310
add_assoc_zval_ex(obj->options, key, key_len, *entry);
311311
PCBC_ADDREF_P(*entry);

src/couchbase/view_query.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ PHP_METHOD(ViewQuery, custom)
429429
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(custom_options), (void **)&entry, &pos) == SUCCESS) {
430430
if (zend_hash_get_current_key_type_ex(Z_ARRVAL_P(custom_options), &pos) == HASH_KEY_IS_STRING) {
431431
char *key = NULL;
432-
uint key_len = 0;
432+
unsigned key_len = 0;
433433
zend_hash_get_current_key_ex(Z_ARRVAL_P(custom_options), &key, &key_len, NULL, 0, &pos);
434434
add_assoc_zval_ex(obj->options, key, key_len, *entry);
435435
PCBC_ADDREF_P(*entry);

0 commit comments

Comments
 (0)