com php-src: fix datatype mismatches: ext/session/php_session .h ext/session/session.c main/SAPI.c main/SAPI.h
| From: | Anatol Belski | Date: | Tue, 24 Mar 2015 21:02:29 +0000 |
| Subject: | com php-src: fix datatype mismatches: ext/session/php_session .h ext/session/session.c main/SAPI.c main/SAPI.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85844@lists.php.net to get a copy of this message | ||
Commit: 3066851dab531ac44a5debbf9b187277158dfcac
Author: Anatol Belski <ab@php.net> Tue, 24 Mar 2015 18:49:54 +0100
Parents: 62b51668e2018be4bef0f3e730df537a3ffb8ac1
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3066851dab531ac44a5debbf9b187277158dfcac
Log:
fix datatype mismatches
Changed paths:
M ext/session/php_session.h
M ext/session/session.c
M main/SAPI.c
M main/SAPI.h
Diff:
diff --git a/ext/session/php_session.h b/ext/session/php_session.h
index c6734ac..58f6ea85 100644
--- a/ext/session/php_session.h
+++ b/ext/session/php_session.h
@@ -36,13 +36,13 @@
#define PS_NUM_APIS 9
#define PS_OPEN_ARGS void **mod_data, const char *save_path, const char *session_name
#define PS_CLOSE_ARGS void **mod_data
-#define PS_READ_ARGS void **mod_data, zend_string *key, zend_string **val, int maxlifetime
-#define PS_WRITE_ARGS void **mod_data, zend_string *key, zend_string *val, int maxlifetime
+#define PS_READ_ARGS void **mod_data, zend_string *key, zend_string **val, zend_long
maxlifetime
+#define PS_WRITE_ARGS void **mod_data, zend_string *key, zend_string *val, zend_long maxlifetime
#define PS_DESTROY_ARGS void **mod_data, zend_string *key
-#define PS_GC_ARGS void **mod_data, int maxlifetime, int *nrdels
+#define PS_GC_ARGS void **mod_data, zend_long maxlifetime, int *nrdels
#define PS_CREATE_SID_ARGS void **mod_data
#define PS_VALIDATE_SID_ARGS void **mod_data, zend_string *key
-#define PS_UPDATE_TIMESTAMP_ARGS void **mod_data, zend_string *key, zend_string *val, int
maxlifetime
+#define PS_UPDATE_TIMESTAMP_ARGS void **mod_data, zend_string *key, zend_string *val, zend_long
maxlifetime
typedef struct ps_module_struct {
const char *s_name;
@@ -227,7 +227,7 @@ ZEND_TSRMLS_CACHE_EXTERN();
#endif
#define PS_SERIALIZER_ENCODE_ARGS void
-#define PS_SERIALIZER_DECODE_ARGS const char *val, int vallen
+#define PS_SERIALIZER_DECODE_ARGS const char *val, size_t vallen
typedef struct ps_serializer_struct {
const char *name;
diff --git a/ext/session/session.c b/ext/session/session.c
index b1582c0..eed91fc 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -767,7 +767,7 @@ static PHP_INI_MH(OnUpdateHashFunc) /* {{{ */
static PHP_INI_MH(OnUpdateRfc1867Freq) /* {{{ */
{
- int tmp;
+ zend_long tmp;
tmp = zend_atoi(new_value->val, new_value->len);
if(tmp < 0) {
php_error_docref(NULL, E_WARNING, "session.upload_progress.freq must be greater than or
equal to zero");
@@ -1004,7 +1004,7 @@ PS_SERIALIZER_DECODE_FUNC(php) /* {{{ */
const char *endptr = val + vallen;
zval current;
int has_value;
- int namelen;
+ ptrdiff_t namelen;
zend_string *name;
php_unserialize_data_t var_hash;
@@ -1988,7 +1988,7 @@ static PHP_FUNCTION(session_id)
if (PS(id)) {
/* keep compatibility for "\0" characters ???
* see: ext/session/tests/session_id_error3.phpt */
- int len = strlen(PS(id)->val);
+ size_t len = strlen(PS(id)->val);
if (UNEXPECTED(len != PS(id)->len)) {
RETVAL_NEW_STR(zend_string_init(PS(id)->val, len, 0));
} else {
@@ -2197,7 +2197,7 @@ static PHP_FUNCTION(session_start)
zval *value;
zend_ulong num_idx;
zend_string *str_idx;
- int read_and_close = 0;
+ zend_long read_and_close = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|a", &options) == FAILURE) {
RETURN_FALSE;
diff --git a/main/SAPI.c b/main/SAPI.c
index d23907c..2757c2e 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -595,7 +595,7 @@ static void sapi_update_response_code(int ncode)
* since zend_llist_del_element only remove one matched item once,
* we should remove them by ourself
*/
-static void sapi_remove_header(zend_llist *l, char *name, uint len) {
+static void sapi_remove_header(zend_llist *l, char *name, size_t len) {
sapi_header_struct *header;
zend_llist_element *next;
zend_llist_element *current=l->head;
@@ -623,7 +623,7 @@ static void sapi_remove_header(zend_llist *l, char *name, uint len) {
}
}
-SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate,
zend_bool replace)
+SAPI_API int sapi_add_header_ex(char *header_line, size_t header_line_len, zend_bool duplicate,
zend_bool replace)
{
sapi_header_line ctr = {0};
int r;
@@ -666,7 +666,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
sapi_header_struct sapi_header;
char *colon_offset;
char *header_line;
- uint header_line_len;
+ size_t header_line_len;
int http_response_code;
if (SG(headers_sent) && !SG(request_info).no_headers) {
diff --git a/main/SAPI.h b/main/SAPI.h
index a8485df..e7a2721 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -52,7 +52,7 @@
typedef struct {
char *header;
- uint header_len;
+ size_t header_len;
} sapi_header_struct;
@@ -169,7 +169,7 @@ END_EXTERN_C()
typedef struct {
char *line; /* If you allocated this, you need to free it yourself */
- uint line_len;
+ size_t line_len;
zend_long response_code; /* long due to zend_parse_parameters compatibility */
} sapi_header_line;
@@ -185,7 +185,7 @@ BEGIN_EXTERN_C()
SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg);
/* Deprecated functions. Use sapi_header_op instead. */
-SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate,
zend_bool replace);
+SAPI_API int sapi_add_header_ex(char *header_line, size_t header_line_len, zend_bool duplicate,
zend_bool replace);
#define sapi_add_header(a, b, c) sapi_add_header_ex((a),(b),(c),1)