Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions ext/date/php_date.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ static void date_period_unset_property(zend_object *object, zend_string *name, v
static HashTable *date_period_get_properties_for(zend_object *object, zend_prop_purpose purpose);
static int date_object_compare_timezone(zval *tz1, zval *tz2);

static PHP_RINIT_FUNCTION(date);
static PHP_RSHUTDOWN_FUNCTION(date);
static PHP_MINIT_FUNCTION(date);
static PHP_MSHUTDOWN_FUNCTION(date);
static PHP_MINFO_FUNCTION(date);
static ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date);

/* {{{ Module struct */
zend_module_entry date_module_entry = {
STANDARD_MODULE_HEADER,
Expand Down Expand Up @@ -399,7 +406,7 @@ static void _php_date_tzinfo_dtor(zval *zv) /* {{{ */
} /* }}} */

/* {{{ PHP_RINIT_FUNCTION */
PHP_RINIT_FUNCTION(date)
static PHP_RINIT_FUNCTION(date)
{
if (DATEG(timezone)) {
efree(DATEG(timezone));
Expand All @@ -413,7 +420,7 @@ PHP_RINIT_FUNCTION(date)
/* }}} */

/* {{{ PHP_RSHUTDOWN_FUNCTION */
PHP_RSHUTDOWN_FUNCTION(date)
static PHP_RSHUTDOWN_FUNCTION(date)
{
if (DATEG(timezone)) {
efree(DATEG(timezone));
Expand All @@ -428,7 +435,7 @@ PHP_RSHUTDOWN_FUNCTION(date)
}
/* }}} */

ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date)
static ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date)
{
if (DATEG(tzcache)) {
zend_hash_destroy(DATEG(tzcache));
Expand All @@ -447,7 +454,7 @@ ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date)
#define DATE_TIMEZONEDB php_date_global_timezone_db ? php_date_global_timezone_db : timelib_builtin_db()

/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(date)
static PHP_MINIT_FUNCTION(date)
{
php_date_global_timezone_db = NULL;
php_date_global_timezone_db_enabled = 0;
Expand All @@ -463,7 +470,7 @@ PHP_MINIT_FUNCTION(date)
/* }}} */

/* {{{ PHP_MSHUTDOWN_FUNCTION */
PHP_MSHUTDOWN_FUNCTION(date)
static PHP_MSHUTDOWN_FUNCTION(date)
{
UNREGISTER_INI_ENTRIES();

Expand All @@ -480,7 +487,7 @@ PHP_MSHUTDOWN_FUNCTION(date)
/* }}} */

/* {{{ PHP_MINFO_FUNCTION */
PHP_MINFO_FUNCTION(date)
static PHP_MINFO_FUNCTION(date)
{
const timelib_tzdb *tzdb = DATE_TIMEZONEDB;

Expand Down
11 changes: 0 additions & 11 deletions ext/date/php_date.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@
extern zend_module_entry date_module_entry;
#define phpext_date_ptr &date_module_entry

PHP_RINIT_FUNCTION(date);
PHP_RSHUTDOWN_FUNCTION(date);
PHP_MINIT_FUNCTION(date);
PHP_MSHUTDOWN_FUNCTION(date);
PHP_MINFO_FUNCTION(date);
ZEND_MODULE_POST_ZEND_DEACTIVATE_D(date);

typedef struct _php_date_obj php_date_obj;
typedef struct _php_timezone_obj php_timezone_obj;
typedef struct _php_interval_obj php_interval_obj;
Expand Down Expand Up @@ -126,12 +119,8 @@ PHPAPI time_t php_time(void);

/* Backwards compatibility wrapper */
PHPAPI zend_long php_parse_date(const char *string, zend_long *now);
PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, bool gmt);
PHPAPI bool php_idate(char format, time_t ts, bool localtime, int *result);

#define _php_strftime php_strftime

PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, bool gm);
PHPAPI zend_string *php_format_date(const char *format, size_t format_len, time_t ts, bool localtime);
PHPAPI zend_string *php_format_date_obj(const char *format, size_t format_len, const php_date_obj *date_obj);

Expand Down
Loading