#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;
#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;
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");
const char *endptr = val + vallen;
zval current;
int has_value;
- int namelen;
+ ptrdiff_t namelen;
zend_string *name;
php_unserialize_data_t var_hash;
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 {
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;
* 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;
}
}
-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;
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) {
typedef struct {
char *header;
- uint header_len;
+ size_t header_len;
} sapi_header_struct;
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;
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)