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, ×tamp) !=
SUCCESS)) {
- WRONG_PARAM_COUNT;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l",
×tamp) == FAILURE) {
+ return;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php