@@ -141,27 +141,28 @@ static bool php_phongo_timestamp_init_from_hash(php_phongo_timestamp_t *intern,
141141 return false;
142142}
143143
144- /* {{{ proto void Timestamp::__construct(integer $increment, integer $timestamp)
144+ /* {{{ proto void Timestamp::__construct(string $increment, string $timestamp)
145145 Construct a new BSON timestamp type, which consists of a 4-byte increment and
146146 4-byte timestamp. */
147147PHP_METHOD (Timestamp , __construct )
148148{
149149 php_phongo_timestamp_t * intern ;
150150 zend_error_handling error_handling ;
151- phongo_long increment ;
152- phongo_long timestamp ;
153-
151+ char * s_increment ;
152+ phongo_zpp_char_len s_increment_len ;
153+ char * s_timestamp ;
154+ phongo_zpp_char_len s_timestamp_len ;
154155
155156 zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
156157 intern = Z_TIMESTAMP_OBJ_P (getThis ());
157158
158- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "ll " , & increment , & timestamp ) == FAILURE ) {
159+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "ss " , & s_increment , & s_increment_len , & s_timestamp , & s_timestamp_len ) == FAILURE ) {
159160 zend_restore_error_handling (& error_handling TSRMLS_CC );
160161 return ;
161162 }
162163 zend_restore_error_handling (& error_handling TSRMLS_CC );
163164
164- php_phongo_timestamp_init (intern , increment , timestamp TSRMLS_CC );
165+ php_phongo_timestamp_init_from_string (intern , s_increment , s_increment_len , s_timestamp , s_timestamp_len TSRMLS_CC );
165166}
166167/* }}} */
167168
0 commit comments