Skip to content

Commit 0b4b793

Browse files
jmikoladerickr
authored andcommitted
PHPC-399: Additional zval_used_for_init cleanup
1 parent 97429ea commit 0b4b793

File tree

8 files changed

+24
-8
lines changed

8 files changed

+24
-8
lines changed

src/BSON/Javascript.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ phongo_create_object_retval php_phongo_javascript_create_object(zend_class_entry
141141
HashTable *php_phongo_javascript_get_debug_info(zval *object, int *is_temp TSRMLS_DC) /* {{{ */
142142
{
143143
php_phongo_javascript_t *intern;
144+
#if PHP_VERSION_ID >= 70000
145+
zval retval;
146+
#else
144147
zval retval = zval_used_for_init;
148+
#endif
145149

146150

147151
*is_temp = 1;

src/BSON/Regex.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ phongo_create_object_retval php_phongo_regex_create_object(zend_class_entry *cla
207207
HashTable *php_phongo_regex_get_debug_info(zval *object, int *is_temp TSRMLS_DC) /* {{{ */
208208
{
209209
php_phongo_regex_t *intern;
210+
#if PHP_VERSION_ID >= 70000
211+
zval retval;
212+
#else
210213
zval retval = zval_used_for_init;
214+
#endif
211215

212216

213217
*is_temp = 1;

src/BSON/Timestamp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,11 @@ phongo_create_object_retval php_phongo_timestamp_create_object(zend_class_entry
150150
HashTable *php_phongo_timestamp_get_debug_info(zval *object, int *is_temp TSRMLS_DC) /* {{{ */
151151
{
152152
php_phongo_timestamp_t *intern;
153+
#if PHP_VERSION_ID >= 70000
154+
zval retval;
155+
#else
153156
zval retval = zval_used_for_init;
157+
#endif
154158

155159

156160
*is_temp = 1;

src/BSON/UTCDateTime.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ phongo_create_object_retval php_phongo_utcdatetime_create_object(zend_class_entr
182182
HashTable *php_phongo_utcdatetime_get_debug_info(zval *object, int *is_temp TSRMLS_DC) /* {{{ */
183183
{
184184
php_phongo_utcdatetime_t *intern;
185+
#if PHP_VERSION_ID >= 70000
186+
zval retval;
187+
#else
185188
zval retval = zval_used_for_init;
189+
#endif
186190

187191
*is_temp = 1;
188192
intern = (php_phongo_utcdatetime_t *)zend_object_store_get_object(object TSRMLS_CC);

src/MongoDB/Command.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ HashTable *php_phongo_command_get_debug_info(zval *object, int *is_temp TSRMLS_D
135135
{
136136
php_phongo_command_t *intern;
137137
#if PHP_VERSION_ID >= 70000
138-
zval retval;
138+
zval retval;
139139
#else
140-
zval retval = zval_used_for_init;
140+
zval retval = zval_used_for_init;
141141
#endif
142142

143143

src/MongoDB/WriteConcern.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ phongo_create_object_retval php_phongo_writeconcern_create_object(zend_class_ent
248248
HashTable *php_phongo_writeconcern_get_debug_info(zval *object, int *is_temp TSRMLS_DC) /* {{{ */
249249
{
250250
#if PHP_VERSION_ID >= 70000
251-
zval retval;
251+
zval retval;
252252
#else
253-
zval retval = zval_used_for_init;
253+
zval retval = zval_used_for_init;
254254
#endif
255255
const mongoc_write_concern_t *write_concern = phongo_write_concern_from_zval(object TSRMLS_CC);
256256

src/MongoDB/WriteConcernError.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ HashTable *php_phongo_writeconcernerror_get_debug_info(zval *object, int *is_tem
178178
{
179179
php_phongo_writeconcernerror_t *intern;
180180
#if PHP_VERSION_ID >= 70000
181-
zval retval;
181+
zval retval;
182182
#else
183-
zval retval = zval_used_for_init;
183+
zval retval = zval_used_for_init;
184184
#endif
185185

186186

src/MongoDB/WriteError.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ HashTable *php_phongo_writeerror_get_debug_info(zval *object, int *is_temp TSRML
200200
{
201201
php_phongo_writeerror_t *intern;
202202
#if PHP_VERSION_ID >= 70000
203-
zval retval;
203+
zval retval;
204204
#else
205-
zval retval = zval_used_for_init;
205+
zval retval = zval_used_for_init;
206206
#endif
207207

208208

0 commit comments

Comments
 (0)