Skip to content

Commit e10425f

Browse files
committed
Add PHPAPI php_session_flush and php_session_destroy
1 parent e2a159f commit e10425f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ext/session/php_session.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ PHPAPI int php_session_update_timestamp(PS_UPDATE_TIMESTAMP_ARGS);
255255

256256
PHPAPI void session_adapt_url(const char *, size_t, char **, size_t *);
257257

258+
PHPAPI int php_session_destroy(void);
258259
PHPAPI void php_add_session_var(zend_string *name);
259260
PHPAPI zval *php_set_session_var(zend_string *name, zval *state_val, php_unserialize_data_t *var_hash);
260261
PHPAPI zval *php_get_session_var(zend_string *name);
@@ -267,6 +268,7 @@ PHPAPI int php_session_register_serializer(const char *name,
267268

268269
PHPAPI void php_session_set_id(char *id);
269270
PHPAPI int php_session_start(void);
271+
PHPAPI int php_session_flush(int write);
270272

271273
PHPAPI ps_module *_php_find_ps_module(char *name);
272274
PHPAPI const ps_serializer *_php_find_ps_serializer(char *name);

ext/session/session.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static inline void php_rshutdown_session_globals(void) /* {{{ */
151151
}
152152
/* }}} */
153153

154-
static int php_session_destroy(void) /* {{{ */
154+
PHPAPI int php_session_destroy(void) /* {{{ */
155155
{
156156
int retval = SUCCESS;
157157

@@ -1606,7 +1606,7 @@ PHPAPI int php_session_start(void) /* {{{ */
16061606
}
16071607
/* }}} */
16081608

1609-
static int php_session_flush(int write) /* {{{ */
1609+
PHPAPI int php_session_flush(int write) /* {{{ */
16101610
{
16111611
if (PS(session_status) == php_session_active) {
16121612
php_session_save_current_state(write);
@@ -1671,7 +1671,7 @@ static PHP_FUNCTION(session_set_cookie_params)
16711671
return;
16721672
}
16731673

1674-
1674+
16751675
if (PS(session_status) == php_session_active) {
16761676
php_error_docref(NULL, E_WARNING, "Cannot change session cookie parameters when session is active");
16771677
RETURN_FALSE;

0 commit comments

Comments
 (0)