Skip to content

Commit 32d7fa6

Browse files
committed
further data type fixes to ext/dba
1 parent 29248d5 commit 32d7fa6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ext/dba/dba.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free)
228228
return len;
229229
} else {
230230
zval tmp;
231-
int len;
231+
size_t len;
232232

233233
ZVAL_COPY(&tmp, key);
234234
convert_to_string(&tmp);
@@ -613,7 +613,7 @@ dba_info *php_dba_find(const char* path)
613613
{
614614
zend_resource *le;
615615
dba_info *info;
616-
int numitems, i;
616+
zend_long numitems, i;
617617

618618
numitems = zend_hash_next_free_element(&EG(regular_list));
619619
for (i=1; i<numitems; i++) {
@@ -642,7 +642,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
642642
dba_info *info, *other;
643643
dba_handler *hptr;
644644
char *key = NULL, *error = NULL;
645-
int keylen = 0;
645+
size_t keylen = 0;
646646
int i;
647647
int lock_mode, lock_flag, lock_dbf = 0;
648648
char *file_mode;

ext/dba/dba_cdb.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,20 +225,20 @@ DBA_DELETE_FUNC(cdb)
225225
/* {{{ cdb_file_lseek
226226
php_stream_seek does not return actual position */
227227
#if DBA_CDB_BUILTIN
228-
int cdb_file_lseek(php_stream *fp, off_t offset, int whence) {
228+
zend_off_t cdb_file_lseek(php_stream *fp, zend_off_t offset, int whence) {
229229
php_stream_seek(fp, offset, whence);
230230
return php_stream_tell(fp);
231231
}
232232
#else
233-
int cdb_file_lseek(int fd, off_t offset, int whence) {
233+
zend_off_t cdb_file_lseek(int fd, zend_off_t offset, int whence) {
234234
return lseek(fd, offset, whence);
235235
}
236236
#endif
237237
/* }}} */
238238

239239
#define CSEEK(n) do { \
240240
if (n >= cdb->eod) return NULL; \
241-
if (cdb_file_lseek(cdb->file, (off_t)n, SEEK_SET) != (off_t) n) return NULL; \
241+
if (cdb_file_lseek(cdb->file, (zend_off_t)n, SEEK_SET) != (zend_off_t) n) return NULL; \
242242
} while (0)
243243

244244

0 commit comments

Comments
 (0)