Re: cvs: php-src /ext/calendar cal_unix.c

From: Date: Wed, 04 Oct 2006 16:44:02 +0000
Subject: Re: cvs: php-src /ext/calendar cal_unix.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-40912@lists.php.net to get a copy of this message
Hannes, It's better to pass a real long to the zend_parse_parameters and then cast it to (time_t) to avoid portability issues. -Andrei On Oct 4, 2006, at 5:50 AM, Hannes Magnusson wrote:
- zval *timestamp; + time_t timestamp = time(NULL); long jdate; - time_t t; struct tm *ta, tmbuf; - int myargc=ZEND_NUM_ARGS(); - if ((myargc > 1) || (zend_get_parameters(ht, myargc, &timestamp) != SUCCESS)) {
-    WRONG_PARAM_COUNT;
+  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &timestamp) == FAILURE) {
+    return;
}


« previous php.cvs (#40912) next »