summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2010-09-27 01:19:57 +0000
committerKalle Sommer Nielsen <kalle@php.net>2010-09-27 01:19:57 +0000
commita3161aa091264561ac07cabb15f506e2a80d1d28 (patch)
treee7067ac01a79a2e48821cadf69173915f9049585
parenta531b5f0d273bdac611d6b96080332a0700b9180 (diff)
downloadphp-git-a3161aa091264561ac07cabb15f506e2a80d1d28.tar.gz
Removed a TSRMLS_FETCH() call in php_idate() in favor of the TSRMLS macros
-rw-r--r--UPGRADING.INTERNALS6
-rw-r--r--ext/date/php_date.c5
-rw-r--r--ext/date/php_date.h2
3 files changed, 8 insertions, 5 deletions
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index bfbfa533e0..a4e3c83b9c 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -99,4 +99,8 @@ Use emalloc, emalloc_rel, efree or efree_rel instead.
. php_get_current_user
PHPAPI php_get_current_user(TSRMLS_D)
- Call: char *user = php_get_current_user(TSRMLS_C); \ No newline at end of file
+ Call: char *user = php_get_current_user(TSRMLS_C);
+
+. php_idate
+ PHPAPI php_idate(char format, time_t ts, int localtime TSRMLS_DC)
+ Call: int ret = php_idate(format, ts, localtime TSRMLS_CC) \ No newline at end of file
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index e6d14fd27e..8a35f9586b 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1203,7 +1203,7 @@ PHPAPI char *php_format_date(char *format, int format_len, time_t ts, int localt
/* {{{ php_idate
*/
-PHPAPI int php_idate(char format, time_t ts, int localtime)
+PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC)
{
timelib_time *t;
timelib_tzinfo *tzi;
@@ -1214,7 +1214,6 @@ PHPAPI int php_idate(char format, time_t ts, int localtime)
t = timelib_time_ctor();
if (!localtime) {
- TSRMLS_FETCH();
tzi = get_timezone_info(TSRMLS_C);
t->tz_info = tzi;
t->zone_type = TIMELIB_ZONETYPE_ID;
@@ -1336,7 +1335,7 @@ PHP_FUNCTION(idate)
ts = time(NULL);
}
- ret = php_idate(format[0], ts, 0);
+ ret = php_idate(format[0], ts, 0 TSRMLS_CC);
if (ret == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unrecognized date format token.");
RETURN_FALSE;
diff --git a/ext/date/php_date.h b/ext/date/php_date.h
index 09755060c2..cf7acada4d 100644
--- a/ext/date/php_date.h
+++ b/ext/date/php_date.h
@@ -163,7 +163,7 @@ ZEND_END_MODULE_GLOBALS(date)
/* Backwards compability wrapper */
PHPAPI signed long php_parse_date(char *string, signed long *now);
PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt);
-PHPAPI int php_idate(char format, time_t ts, int localtime);
+PHPAPI int php_idate(char format, time_t ts, int localtime TSRMLS_DC);
#if HAVE_STRFTIME
#define _php_strftime php_strftime
PHPAPI void php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm);