From c081ce628f0d76d44784d7bb8e06428b06142ac0 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 3 Jan 2014 11:08:10 +0800 Subject: Bump year --- ext/session/php_session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 4307e6afc5..b2866ad037 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2013 The PHP Group | + | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | -- cgit v1.2.1 From c9bca5039be162bd056909ce9c21f6fd96e5204a Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 26 Mar 2014 23:23:54 +0800 Subject: Refactor session (incompleted) --- ext/session/php_session.h | 66 +++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 34 deletions(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index b2866ad037..0f402080ca 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -34,14 +34,14 @@ #define PS_OPEN_ARGS void **mod_data, const char *save_path, const char *session_name TSRMLS_DC #define PS_CLOSE_ARGS void **mod_data TSRMLS_DC -#define PS_READ_ARGS void **mod_data, const char *key, char **val, int *vallen TSRMLS_DC -#define PS_WRITE_ARGS void **mod_data, const char *key, const char *val, const int vallen TSRMLS_DC -#define PS_DESTROY_ARGS void **mod_data, const char *key TSRMLS_DC +#define PS_READ_ARGS void **mod_data, const zend_string *key, char **val, int *vallen TSRMLS_DC +#define PS_WRITE_ARGS void **mod_data, const zend_string *key, const char *val, const int vallen TSRMLS_DC +#define PS_DESTROY_ARGS void **mod_data, const zend_string *key TSRMLS_DC #define PS_GC_ARGS void **mod_data, int maxlifetime, int *nrdels TSRMLS_DC -#define PS_CREATE_SID_ARGS void **mod_data, int *newlen TSRMLS_DC +#define PS_CREATE_SID_ARGS void **mod_data TSRMLS_DC /* default create id function */ -PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS); +PHPAPI zend_string *php_session_create_id(PS_CREATE_SID_ARGS); typedef struct ps_module_struct { const char *s_name; @@ -51,7 +51,7 @@ typedef struct ps_module_struct { int (*s_write)(PS_WRITE_ARGS); int (*s_destroy)(PS_DESTROY_ARGS); int (*s_gc)(PS_GC_ARGS); - char *(*s_create_sid)(PS_CREATE_SID_ARGS); + zend_string *(*s_create_sid)(PS_CREATE_SID_ARGS); } ps_module; #define PS_GET_MOD_DATA() *mod_data @@ -63,7 +63,7 @@ typedef struct ps_module_struct { #define PS_WRITE_FUNC(x) int ps_write_##x(PS_WRITE_ARGS) #define PS_DESTROY_FUNC(x) int ps_delete_##x(PS_DESTROY_ARGS) #define PS_GC_FUNC(x) int ps_gc_##x(PS_GC_ARGS) -#define PS_CREATE_SID_FUNC(x) char *ps_create_sid_##x(PS_CREATE_SID_ARGS) +#define PS_CREATE_SID_FUNC(x) zend_string *ps_create_sid_##x(PS_CREATE_SID_ARGS) #define PS_FUNCS(x) \ PS_OPEN_FUNC(x); \ @@ -111,17 +111,17 @@ typedef struct _php_session_rfc1867_progress { zend_bool apply_trans_sid; size_t content_length; - zval *data; /* the array exported to session data */ - zval *post_bytes_processed; /* data["bytes_processed"] */ - zval *files; /* data["files"] array */ - zval *current_file; /* array of currently uploading file */ - zval *current_file_bytes_processed; + zval data; /* the array exported to session data */ + zval post_bytes_processed; /* data["bytes_processed"] */ + zval files; /* data["files"] array */ + zval current_file; /* array of currently uploading file */ + zval current_file_bytes_processed; } php_session_rfc1867_progress; typedef struct _php_ps_globals { char *save_path; char *session_name; - char *id; + zend_string *id; char *extern_referer_chk; char *entropy_file; char *cache_limiter; @@ -141,21 +141,21 @@ typedef struct _php_ps_globals { int module_number; long cache_expire; union { - zval *names[7]; + zval names[7]; struct { - zval *ps_open; - zval *ps_close; - zval *ps_read; - zval *ps_write; - zval *ps_destroy; - zval *ps_gc; - zval *ps_create_sid; + zval ps_open; + zval ps_close; + zval ps_read; + zval ps_write; + zval ps_destroy; + zval ps_gc; + zval ps_create_sid; } name; } mod_user_names; int mod_user_implemented; int mod_user_is_open; const struct ps_serializer_struct *serializer; - zval *http_session_vars; + zval http_session_vars; zend_bool auto_start; zend_bool use_cookies; zend_bool use_only_cookies; @@ -194,12 +194,12 @@ extern zend_module_entry session_module_entry; #define PS(v) (ps_globals.v) #endif -#define PS_SERIALIZER_ENCODE_ARGS char **newstr, int *newlen TSRMLS_DC +#define PS_SERIALIZER_ENCODE_ARGS TSRMLS_D #define PS_SERIALIZER_DECODE_ARGS const char *val, int vallen TSRMLS_DC typedef struct ps_serializer_struct { const char *name; - int (*encode)(PS_SERIALIZER_ENCODE_ARGS); + zend_string *(*encode)(PS_SERIALIZER_ENCODE_ARGS); int (*decode)(PS_SERIALIZER_DECODE_ARGS); } ps_serializer; @@ -207,7 +207,7 @@ typedef struct ps_serializer_struct { #define PS_SERIALIZER_DECODE_NAME(x) ps_srlzr_decode_##x #define PS_SERIALIZER_ENCODE_FUNC(x) \ - int PS_SERIALIZER_ENCODE_NAME(x)(PS_SERIALIZER_ENCODE_ARGS) + zend_string *PS_SERIALIZER_ENCODE_NAME(x)(PS_SERIALIZER_ENCODE_ARGS) #define PS_SERIALIZER_DECODE_FUNC(x) \ int PS_SERIALIZER_DECODE_NAME(x)(PS_SERIALIZER_DECODE_ARGS) @@ -222,12 +222,12 @@ PHPAPI void session_adapt_url(const char *, size_t, char **, size_t * TSRMLS_DC) PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC); PHPAPI void php_set_session_var(char *name, size_t namelen, zval *state_val, php_unserialize_data_t *var_hash TSRMLS_DC); -PHPAPI int php_get_session_var(char *name, size_t namelen, zval ***state_var TSRMLS_DC); +PHPAPI zval *php_get_session_var(char *name, size_t namelen TSRMLS_DC); PHPAPI int php_session_register_module(ps_module *); PHPAPI int php_session_register_serializer(const char *name, - int (*encode)(PS_SERIALIZER_ENCODE_ARGS), + zend_string *(*encode)(PS_SERIALIZER_ENCODE_ARGS), int (*decode)(PS_SERIALIZER_DECODE_ARGS)); PHPAPI void php_session_set_id(char *id TSRMLS_DC); @@ -253,24 +253,22 @@ PHPAPI void php_session_reset_id(TSRMLS_D); #define PS_ENCODE_VARS \ - char *key; \ - uint key_length; \ + zend_string *key; \ ulong num_key; \ - zval **struc; + zval *struc; #define PS_ENCODE_LOOP(code) do { \ - HashTable *_ht = Z_ARRVAL_P(PS(http_session_vars)); \ + HashTable *_ht = Z_ARRVAL(PS(http_session_vars)); \ int key_type; \ \ for (zend_hash_internal_pointer_reset(_ht); \ - (key_type = zend_hash_get_current_key_ex(_ht, &key, &key_length, &num_key, 0, NULL)) != HASH_KEY_NON_EXISTENT; \ + (key_type = zend_hash_get_current_key_ex(_ht, &key, &num_key, 0, NULL)) != HASH_KEY_NON_EXISTENT; \ zend_hash_move_forward(_ht)) { \ if (key_type == HASH_KEY_IS_LONG) { \ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Skipping numeric key %ld", num_key); \ continue; \ } \ - key_length--; \ - if (php_get_session_var(key, key_length, &struc TSRMLS_CC) == SUCCESS) { \ + if ((struc = php_get_session_var(key->val, key->len TSRMLS_CC))) { \ code; \ } \ } \ -- cgit v1.2.1 From 3647fc6fcc63262e0347ee78a37b2410bf6a7035 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 28 Mar 2014 18:46:25 +0800 Subject: Refactor session (incompleted) --- ext/session/php_session.h | 64 ++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 31 deletions(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 0f402080ca..b50a35a1c4 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -34,9 +34,9 @@ #define PS_OPEN_ARGS void **mod_data, const char *save_path, const char *session_name TSRMLS_DC #define PS_CLOSE_ARGS void **mod_data TSRMLS_DC -#define PS_READ_ARGS void **mod_data, const zend_string *key, char **val, int *vallen TSRMLS_DC -#define PS_WRITE_ARGS void **mod_data, const zend_string *key, const char *val, const int vallen TSRMLS_DC -#define PS_DESTROY_ARGS void **mod_data, const zend_string *key TSRMLS_DC +#define PS_READ_ARGS void **mod_data, zend_string *key, zend_string **val TSRMLS_DC +#define PS_WRITE_ARGS void **mod_data, zend_string *key, zend_string *val TSRMLS_DC +#define PS_DESTROY_ARGS void **mod_data, zend_string *key TSRMLS_DC #define PS_GC_ARGS void **mod_data, int maxlifetime, int *nrdels TSRMLS_DC #define PS_CREATE_SID_ARGS void **mod_data TSRMLS_DC @@ -220,9 +220,9 @@ typedef struct ps_serializer_struct { PHPAPI void session_adapt_url(const char *, size_t, char **, size_t * TSRMLS_DC); -PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC); -PHPAPI void php_set_session_var(char *name, size_t namelen, zval *state_val, php_unserialize_data_t *var_hash TSRMLS_DC); -PHPAPI zval *php_get_session_var(char *name, size_t namelen TSRMLS_DC); +PHPAPI void php_add_session_var(zend_string *name TSRMLS_DC); +PHPAPI void php_set_session_var(zend_string *name, zval *state_val, php_unserialize_data_t *var_hash TSRMLS_DC); +PHPAPI zval *php_get_session_var(zend_string *name TSRMLS_DC); PHPAPI int php_session_register_module(ps_module *); @@ -239,39 +239,41 @@ PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC); PHPAPI int php_session_valid_key(const char *key); PHPAPI void php_session_reset_id(TSRMLS_D); -#define PS_ADD_VARL(name,namelen) do { \ - php_add_session_var(name, namelen TSRMLS_CC); \ +#define PS_ADD_VARL(name) do { \ + php_add_session_var(name TSRMLS_CC); \ } while (0) -#define PS_ADD_VAR(name) PS_ADD_VARL(name, strlen(name)) +#define PS_ADD_VAR(name) PS_ADD_VARL(name) -#define PS_DEL_VARL(name,namelen) do { \ - if (PS(http_session_vars)) { \ - zend_hash_del(Z_ARRVAL_P(PS(http_session_vars)), name, namelen+1); \ - } \ +#define PS_DEL_VARL(name) do { \ + if (!ZVAL_IS_NULL(&PS(http_session_vars))) { \ + zend_hash_del(Z_ARRVAL(PS(http_session_vars)), name); \ + } \ } while (0) -#define PS_ENCODE_VARS \ - zend_string *key; \ - ulong num_key; \ +#define PS_ENCODE_VARS \ + zend_string *key; \ + ulong num_key; \ zval *struc; -#define PS_ENCODE_LOOP(code) do { \ - HashTable *_ht = Z_ARRVAL(PS(http_session_vars)); \ - int key_type; \ - \ - for (zend_hash_internal_pointer_reset(_ht); \ - (key_type = zend_hash_get_current_key_ex(_ht, &key, &num_key, 0, NULL)) != HASH_KEY_NON_EXISTENT; \ - zend_hash_move_forward(_ht)) { \ - if (key_type == HASH_KEY_IS_LONG) { \ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Skipping numeric key %ld", num_key); \ - continue; \ - } \ - if ((struc = php_get_session_var(key->val, key->len TSRMLS_CC))) { \ - code; \ - } \ - } \ +#define PS_ENCODE_LOOP(code) do { \ + HashTable *_ht = Z_ARRVAL_P(Z_REFVAL(PS(http_session_vars))); \ + int key_type; \ + \ + for (zend_hash_internal_pointer_reset(_ht); \ + (key_type = zend_hash_get_current_key_ex(_ht, &key, \ + &num_key, 0, NULL)) != HASH_KEY_NON_EXISTENT; \ + zend_hash_move_forward(_ht)) { \ + if (key_type == HASH_KEY_IS_LONG) { \ + php_error_docref(NULL TSRMLS_CC, E_NOTICE, \ + "Skipping numeric key %ld", num_key); \ + continue; \ + } \ + if ((struc = php_get_session_var(key TSRMLS_CC))) { \ + code; \ + } \ + } \ } while(0) PHPAPI ZEND_EXTERN_MODULE_GLOBALS(ps) -- cgit v1.2.1 From 5c1595ca8e1326536d4aa37e03405813a6d55959 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sat, 29 Mar 2014 17:39:26 +0800 Subject: Refactor session (incompleted) --- ext/session/php_session.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index b50a35a1c4..0153fe97e8 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -112,10 +112,10 @@ typedef struct _php_session_rfc1867_progress { size_t content_length; zval data; /* the array exported to session data */ - zval post_bytes_processed; /* data["bytes_processed"] */ + zval *post_bytes_processed; /* data["bytes_processed"] */ zval files; /* data["files"] array */ zval current_file; /* array of currently uploading file */ - zval current_file_bytes_processed; + zval *current_file_bytes_processed; } php_session_rfc1867_progress; typedef struct _php_ps_globals { @@ -174,8 +174,8 @@ typedef struct _php_ps_globals { php_session_rfc1867_progress *rfc1867_progress; zend_bool rfc1867_enabled; /* session.upload_progress.enabled */ zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ - smart_str rfc1867_prefix; /* session.upload_progress.prefix */ - smart_str rfc1867_name; /* session.upload_progress.name */ + char *rfc1867_prefix; /* session.upload_progress.prefix */ + char *rfc1867_name; /* session.upload_progress.name */ long rfc1867_freq; /* session.upload_progress.freq */ double rfc1867_min_freq; /* session.upload_progress.min_freq */ -- cgit v1.2.1 From 3d17219cd88a73306acd6eeff8cbae02868318c6 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 7 Apr 2014 23:14:17 +0400 Subject: Refactored zend_hash_* iteration API zend_hash_fove_forward_ex(ht, pos) and family require second argument to be real pointer. &(ht)->nInternalPointer should be passed instead of NULL. zend_hash_update_current_key() may work only with internal pointer. --- ext/session/php_session.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 0153fe97e8..608d6bfdc2 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -262,8 +262,8 @@ PHPAPI void php_session_reset_id(TSRMLS_D); int key_type; \ \ for (zend_hash_internal_pointer_reset(_ht); \ - (key_type = zend_hash_get_current_key_ex(_ht, &key, \ - &num_key, 0, NULL)) != HASH_KEY_NON_EXISTENT; \ + (key_type = zend_hash_get_current_key(_ht, &key, \ + &num_key, 0)) != HASH_KEY_NON_EXISTENT; \ zend_hash_move_forward(_ht)) { \ if (key_type == HASH_KEY_IS_LONG) { \ php_error_docref(NULL TSRMLS_CC, E_NOTICE, \ -- cgit v1.2.1 From 6bfedfd22eb8521cd0f38ab45fca3c877ee724ca Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 10 Apr 2014 18:08:11 +0400 Subject: Fixed unserialize() --- ext/session/php_session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 608d6bfdc2..2bf0d858f7 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -221,7 +221,7 @@ typedef struct ps_serializer_struct { PHPAPI void session_adapt_url(const char *, size_t, char **, size_t * TSRMLS_DC); PHPAPI void php_add_session_var(zend_string *name TSRMLS_DC); -PHPAPI void php_set_session_var(zend_string *name, zval *state_val, php_unserialize_data_t *var_hash TSRMLS_DC); +PHPAPI zval *php_set_session_var(zend_string *name, zval *state_val, php_unserialize_data_t *var_hash TSRMLS_DC); PHPAPI zval *php_get_session_var(zend_string *name TSRMLS_DC); PHPAPI int php_session_register_module(ps_module *); -- cgit v1.2.1 From d8651fbe1c4caaaedc42cef1dee0dd3b3f1e447e Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sat, 3 May 2014 16:06:27 +0800 Subject: Make they are in the same style of Z_ISREF --- ext/session/php_session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 2bf0d858f7..e6d6342ac7 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -246,7 +246,7 @@ PHPAPI void php_session_reset_id(TSRMLS_D); #define PS_ADD_VAR(name) PS_ADD_VARL(name) #define PS_DEL_VARL(name) do { \ - if (!ZVAL_IS_NULL(&PS(http_session_vars))) { \ + if (!Z_ISNULL(PS(http_session_vars))) { \ zend_hash_del(Z_ARRVAL(PS(http_session_vars)), name); \ } \ } while (0) -- cgit v1.2.1 From 8d87e3b841086fa8173b7c6b46c8e75e7c8bd8e2 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Sun, 11 May 2014 22:04:45 +0800 Subject: Refactoring wddx (incompleted, is there any one use it? ) --- ext/session/php_session.h | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index e6d6342ac7..403d9e0086 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -257,24 +257,19 @@ PHPAPI void php_session_reset_id(TSRMLS_D); ulong num_key; \ zval *struc; -#define PS_ENCODE_LOOP(code) do { \ - HashTable *_ht = Z_ARRVAL_P(Z_REFVAL(PS(http_session_vars))); \ - int key_type; \ - \ - for (zend_hash_internal_pointer_reset(_ht); \ - (key_type = zend_hash_get_current_key(_ht, &key, \ - &num_key, 0)) != HASH_KEY_NON_EXISTENT; \ - zend_hash_move_forward(_ht)) { \ - if (key_type == HASH_KEY_IS_LONG) { \ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, \ - "Skipping numeric key %ld", num_key); \ - continue; \ - } \ - if ((struc = php_get_session_var(key TSRMLS_CC))) { \ - code; \ - } \ - } \ - } while(0) +#define PS_ENCODE_LOOP(code) do { \ + HashTable *_ht = Z_ARRVAL_P(Z_REFVAL(PS(http_session_vars))); \ + ZEND_HASH_FOREACH_KEY(_ht, num_key, key) { \ + if (key == NULL) { \ + php_error_docref(NULL TSRMLS_CC, E_NOTICE, \ + "Skipping numeric key %ld", num_key); \ + continue; \ + } \ + if ((struc = php_get_session_var(key TSRMLS_CC))) { \ + code; \ + } \ + } ZEND_HASH_FOREACH_END(); \ +} while(0) PHPAPI ZEND_EXTERN_MODULE_GLOBALS(ps) -- cgit v1.2.1 From 48e6adeee23ef7e8c71656f2eaf3dc4d228f7fd6 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 19 Aug 2014 14:18:24 +0200 Subject: ported ext/session --- ext/session/php_session.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 403d9e0086..0e2eca9188 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -104,8 +104,8 @@ typedef struct _php_session_rfc1867_progress { zval sid; smart_str key; - long update_step; - long next_update; + php_int_t update_step; + php_int_t next_update; double next_update_time; zend_bool cancel_upload; zend_bool apply_trans_sid; @@ -125,8 +125,8 @@ typedef struct _php_ps_globals { char *extern_referer_chk; char *entropy_file; char *cache_limiter; - long entropy_length; - long cookie_lifetime; + php_int_t entropy_length; + php_int_t cookie_lifetime; char *cookie_path; char *cookie_domain; zend_bool cookie_secure; @@ -135,11 +135,11 @@ typedef struct _php_ps_globals { ps_module *default_mod; void *mod_data; php_session_status session_status; - long gc_probability; - long gc_divisor; - long gc_maxlifetime; + php_int_t gc_probability; + php_int_t gc_divisor; + php_int_t gc_maxlifetime; int module_number; - long cache_expire; + php_int_t cache_expire; union { zval names[7]; struct { @@ -162,11 +162,11 @@ typedef struct _php_ps_globals { zend_bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ zend_bool apply_trans_sid; /* whether or not to enable trans-sid for the current request */ - long hash_func; + php_int_t hash_func; #if defined(HAVE_HASH_EXT) && !defined(COMPILE_DL_HASH) php_hash_ops *hash_ops; #endif - long hash_bits_per_character; + php_int_t hash_bits_per_character; int send_cookie; int define_sid; zend_bool invalid_session_id; /* allows the driver to report about an invalid session id and request id regeneration */ @@ -176,7 +176,7 @@ typedef struct _php_ps_globals { zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ char *rfc1867_prefix; /* session.upload_progress.prefix */ char *rfc1867_name; /* session.upload_progress.name */ - long rfc1867_freq; /* session.upload_progress.freq */ + php_int_t rfc1867_freq; /* session.upload_progress.freq */ double rfc1867_min_freq; /* session.upload_progress.min_freq */ zend_bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ @@ -254,7 +254,7 @@ PHPAPI void php_session_reset_id(TSRMLS_D); #define PS_ENCODE_VARS \ zend_string *key; \ - ulong num_key; \ + php_uint_t num_key; \ zval *struc; #define PS_ENCODE_LOOP(code) do { \ -- cgit v1.2.1 From 70de6180d5a022806212d2b6eebbba48af827940 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sun, 24 Aug 2014 02:35:34 +0200 Subject: fixes to %pd format usage --- ext/session/php_session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 0e2eca9188..e553ca0e1a 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -262,7 +262,7 @@ PHPAPI void php_session_reset_id(TSRMLS_D); ZEND_HASH_FOREACH_KEY(_ht, num_key, key) { \ if (key == NULL) { \ php_error_docref(NULL TSRMLS_CC, E_NOTICE, \ - "Skipping numeric key %ld", num_key); \ + "Skipping numeric key %pd", num_key); \ continue; \ } \ if ((struc = php_get_session_var(key TSRMLS_CC))) { \ -- cgit v1.2.1 From c3e3c98ec666812daaaca896cf5ef758a8a6df14 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 19:24:55 +0200 Subject: master renames phase 1 --- ext/session/php_session.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index e553ca0e1a..790e116528 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -104,8 +104,8 @@ typedef struct _php_session_rfc1867_progress { zval sid; smart_str key; - php_int_t update_step; - php_int_t next_update; + zend_long update_step; + zend_long next_update; double next_update_time; zend_bool cancel_upload; zend_bool apply_trans_sid; @@ -125,8 +125,8 @@ typedef struct _php_ps_globals { char *extern_referer_chk; char *entropy_file; char *cache_limiter; - php_int_t entropy_length; - php_int_t cookie_lifetime; + zend_long entropy_length; + zend_long cookie_lifetime; char *cookie_path; char *cookie_domain; zend_bool cookie_secure; @@ -135,11 +135,11 @@ typedef struct _php_ps_globals { ps_module *default_mod; void *mod_data; php_session_status session_status; - php_int_t gc_probability; - php_int_t gc_divisor; - php_int_t gc_maxlifetime; + zend_long gc_probability; + zend_long gc_divisor; + zend_long gc_maxlifetime; int module_number; - php_int_t cache_expire; + zend_long cache_expire; union { zval names[7]; struct { @@ -162,11 +162,11 @@ typedef struct _php_ps_globals { zend_bool use_trans_sid; /* contains the INI value of whether to use trans-sid */ zend_bool apply_trans_sid; /* whether or not to enable trans-sid for the current request */ - php_int_t hash_func; + zend_long hash_func; #if defined(HAVE_HASH_EXT) && !defined(COMPILE_DL_HASH) php_hash_ops *hash_ops; #endif - php_int_t hash_bits_per_character; + zend_long hash_bits_per_character; int send_cookie; int define_sid; zend_bool invalid_session_id; /* allows the driver to report about an invalid session id and request id regeneration */ @@ -176,7 +176,7 @@ typedef struct _php_ps_globals { zend_bool rfc1867_cleanup; /* session.upload_progress.cleanup */ char *rfc1867_prefix; /* session.upload_progress.prefix */ char *rfc1867_name; /* session.upload_progress.name */ - php_int_t rfc1867_freq; /* session.upload_progress.freq */ + zend_long rfc1867_freq; /* session.upload_progress.freq */ double rfc1867_min_freq; /* session.upload_progress.min_freq */ zend_bool use_strict_mode; /* whether or not PHP accepts unknown session ids */ @@ -254,7 +254,7 @@ PHPAPI void php_session_reset_id(TSRMLS_D); #define PS_ENCODE_VARS \ zend_string *key; \ - php_uint_t num_key; \ + zend_ulong num_key; \ zval *struc; #define PS_ENCODE_LOOP(code) do { \ -- cgit v1.2.1 From d0cb715373c3fbe9dc095378ec5ed8c71f799f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Schl=C3=BCter?= Date: Fri, 19 Sep 2014 18:33:14 +0200 Subject: s/PHP 5/PHP 7/ --- ext/session/php_session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/session/php_session.h') diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 790e116528..9fb6477056 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -1,6 +1,6 @@ /* +----------------------------------------------------------------------+ - | PHP Version 5 | + | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2014 The PHP Group | +----------------------------------------------------------------------+ -- cgit v1.2.1