cvs: php4 /ext/session php_session.h session.c

From: Date: Sat, 30 Mar 2002 16:29:15 +0000
Subject: cvs: php4 /ext/session php_session.h session.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10783@lists.php.net to get a copy of this message
sas Sat Mar 30 11:29:15 2002 EDT Modified files: /php4/ext/session session.c php_session.h Log: - Proper use of underscores (s/createsid/create_sid/) - Bump the API date and remove extra cpp macro - Pass TSRMLS appropiately to the create_sid function Index: php4/ext/session/session.c diff -u php4/ext/session/session.c:1.295 php4/ext/session/session.c:1.296 --- php4/ext/session/session.c:1.295 Fri Mar 29 11:00:27 2002 +++ php4/ext/session/session.c Sat Mar 30 11:29:15 2002 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: session.c,v 1.295 2002/03/29 16:00:27 mlwmohawk Exp $ */ +/* $Id: session.c,v 1.296 2002/03/30 16:29:15 sas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -495,7 +495,7 @@ static char hexconvtab[] = "0123456789abcdef"; -char *php_session_create_id(PS_CREATESID_ARGS) +char *php_session_create_id(PS_CREATE_SID_ARGS) { PHP_MD5_CTX context; unsigned char digest[16]; @@ -557,7 +557,7 @@ /* If there is no ID, use session module to create one */ if (!PS(id)) - PS(id) = PS(mod)->createsid(&PS(mod_data), NULL); + PS(id) = PS(mod)->create_sid(&PS(mod_data), NULL TSRMLS_CC); /* Read data */ /* Question: if you create a SID here, should you also try to read data? Index: php4/ext/session/php_session.h diff -u php4/ext/session/php_session.h:1.74 php4/ext/session/php_session.h:1.75 --- php4/ext/session/php_session.h:1.74 Fri Mar 29 11:00:25 2002 +++ php4/ext/session/php_session.h Sat Mar 30 11:29:15 2002 @@ -21,7 +21,7 @@ #include "ext/standard/php_var.h" -#define PHP_SESSION_API 20020306 +#define PHP_SESSION_API 20020330 #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 @@ -29,12 +29,10 @@ #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_GC_ARGS void **mod_data, int maxlifetime, int *nrdels TSRMLS_DC - -#define HAVE_PHP_SESSION_CREATESID -#define PS_CREATESID_ARGS void **mod_data, int *newlen +#define PS_CREATE_SID_ARGS void **mod_data, int *newlen TSRMLS_DC /* default create id function */ -char *php_session_create_id(PS_CREATESID_ARGS); +char *php_session_create_id(PS_CREATE_SID_ARGS); typedef struct ps_module_struct { const char *name; @@ -44,7 +42,7 @@ int (*write)(PS_WRITE_ARGS); int (*destroy)(PS_DESTROY_ARGS); int (*gc)(PS_GC_ARGS); - char *(*createsid)(PS_CREATESID_ARGS); + char *(*create_sid)(PS_CREATE_SID_ARGS); } ps_module; #define PS_GET_MOD_DATA() *mod_data @@ -56,7 +54,7 @@ #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_CREATESID_FUNC(x) char *ps_createsid_##x(PS_CREATESID_ARGS) +#define PS_CREATE_SID_FUNC(x) char *ps_create_sid_##x(PS_CREATE_SID_ARGS) #define PS_FUNCS(x) \ PS_OPEN_FUNC(x); \ @@ -65,7 +63,7 @@ PS_WRITE_FUNC(x); \ PS_DESTROY_FUNC(x); \ PS_GC_FUNC(x); \ - PS_CREATESID_FUNC(x) + PS_CREATE_SID_FUNC(x) #define PS_MOD(x) \ #x, ps_open_##x, ps_close_##x, ps_read_##x, ps_write_##x, \ @@ -79,11 +77,11 @@ PS_WRITE_FUNC(x); \ PS_DESTROY_FUNC(x); \ PS_GC_FUNC(x); \ - PS_CREATESID_FUNC(x) + PS_CREATE_SID_FUNC(x) #define PS_MOD_SID(x) \ #x, ps_open_##x, ps_close_##x, ps_read_##x, ps_write_##x, \ - ps_delete_##x, ps_gc_##x, ps_createsid_##x + ps_delete_##x, ps_gc_##x, ps_create_sid_##x typedef enum { php_session_disabled,

« previous php.cvs (#10783) next »