File tree Expand file tree Collapse file tree 1 file changed +6
-40
lines changed Expand file tree Collapse file tree 1 file changed +6
-40
lines changed Original file line number Diff line number Diff line change @@ -209,44 +209,21 @@ nruserfn_t* nr_php_wrap_generic_callable(zval* callable,
209
209
}
210
210
211
211
inline static void release_zval (zval * * ppzv ) {
212
- #ifdef PHP7
213
212
nr_php_zval_free (ppzv );
214
- #else
215
- if (NULL == ppzv ) {
216
- return ;
217
- }
218
- if (NULL == * ppzv ) {
219
- return ;
220
- }
221
-
222
- zval_ptr_dtor (ppzv );
223
- * ppzv = NULL ;
224
- #endif /* PHP7 */
225
213
}
226
214
227
215
zval * nr_php_arg_get (ssize_t index , NR_EXECUTE_PROTO TSRMLS_DC ) {
228
216
zval * arg ;
229
217
NR_UNUSED_FUNC_RETURN_VALUE ;
230
- #ifdef PHP7
231
- {
232
- zval * orig ;
218
+ zval * orig ;
233
219
234
- arg = NULL ;
235
- orig = nr_php_get_user_func_arg ((zend_uint )index , NR_EXECUTE_ORIG_ARGS );
220
+ arg = NULL ;
221
+ orig = nr_php_get_user_func_arg ((zend_uint )index , NR_EXECUTE_ORIG_ARGS );
236
222
237
- if (orig ) {
238
- arg = nr_php_zval_alloc ();
239
- ZVAL_DUP (arg , orig );
240
- }
223
+ if (orig ) {
224
+ arg = nr_php_zval_alloc ();
225
+ ZVAL_DUP (arg , orig );
241
226
}
242
- #else
243
- arg = nr_php_get_user_func_arg ((zend_uint )index ,
244
- NR_EXECUTE_ORIG_ARGS TSRMLS_CC );
245
-
246
- if (arg ) {
247
- Z_ADDREF_P (arg );
248
- }
249
- #endif /* PHP7 */
250
227
251
228
return arg ;
252
229
}
@@ -360,15 +337,8 @@ zval* nr_php_scope_get(NR_EXECUTE_PROTO TSRMLS_DC) {
360
337
return NULL ;
361
338
}
362
339
363
- #ifdef PHP7
364
340
this_copy = nr_php_zval_alloc ();
365
341
ZVAL_DUP (this_copy , this_obj );
366
- #else
367
- NR_UNUSED_SPECIALFN ;
368
-
369
- this_copy = this_obj ;
370
- Z_ADDREF_P (this_copy );
371
- #endif
372
342
373
343
return this_copy ;
374
344
}
@@ -378,13 +348,9 @@ void nr_php_scope_release(zval** ppzv) {
378
348
}
379
349
380
350
zval * * nr_php_get_return_value_ptr (TSRMLS_D ) {
381
- #ifdef PHP7
382
351
if (NULL == EG (current_execute_data )) {
383
352
return NULL ;
384
353
}
385
354
386
355
return & EG (current_execute_data )-> return_value ;
387
- #else
388
- return EG (return_value_ptr_ptr );
389
- #endif /* PHP7 */
390
356
}
You can’t perform that action at this time.
0 commit comments