@@ -141,27 +141,28 @@ static bool php_phongo_timestamp_init_from_hash(php_phongo_timestamp_t *intern,
141
141
return false;
142
142
}
143
143
144
- /* {{{ proto void Timestamp::__construct(integer $increment, integer $timestamp)
144
+ /* {{{ proto void Timestamp::__construct(string $increment, string $timestamp)
145
145
Construct a new BSON timestamp type, which consists of a 4-byte increment and
146
146
4-byte timestamp. */
147
147
PHP_METHOD (Timestamp , __construct )
148
148
{
149
149
php_phongo_timestamp_t * intern ;
150
150
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 ;
154
155
155
156
zend_replace_error_handling (EH_THROW , phongo_exception_from_phongo_domain (PHONGO_ERROR_INVALID_ARGUMENT ), & error_handling TSRMLS_CC );
156
157
intern = Z_TIMESTAMP_OBJ_P (getThis ());
157
158
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 ) {
159
160
zend_restore_error_handling (& error_handling TSRMLS_CC );
160
161
return ;
161
162
}
162
163
zend_restore_error_handling (& error_handling TSRMLS_CC );
163
164
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 );
165
166
}
166
167
/* }}} */
167
168
0 commit comments