Skip to content

Commit 1870876

Browse files
committed
chore(agent): remove obsolete code (10/17) (#1079)
This PR removes obsolete `PHP7` codeblocks. PR: 10/17
1 parent db68f7d commit 1870876

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

agent/php_nrini.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -279,21 +279,12 @@ static nr_status_t nr_strtoi(int* val_p, const char* str, int base) {
279279
return NR_SUCCESS;
280280
}
281281

282-
#ifdef PHP7
283282
#define PHP_INI_ENTRY_NAME(ie) (ie)->name->val
284283
#define PHP_INI_ENTRY_NAME_LEN(ie) (ie)->name->len + 1
285284
#define PHP_INI_ENTRY_ORIG_VALUE(ie) (ie)->orig_value->val
286285
#define PHP_INI_ENTRY_ORIG_VALUE_LEN(ie) (ie)->orig_value->len
287286
#define PHP_INI_ENTRY_VALUE(ie) (ie)->value->val
288287
#define PHP_INI_ENTRY_VALUE_LEN(ie) (ie)->value->len
289-
#else
290-
#define PHP_INI_ENTRY_NAME(ie) (ie)->name
291-
#define PHP_INI_ENTRY_NAME_LEN(ie) (ie)->name_length
292-
#define PHP_INI_ENTRY_ORIG_VALUE(ie) (ie)->orig_value
293-
#define PHP_INI_ENTRY_ORIG_VALUE_LEN(ie) (ie)->orig_value_length
294-
#define PHP_INI_ENTRY_VALUE(ie) (ie)->value
295-
#define PHP_INI_ENTRY_VALUE_LEN(ie) (ie)->value_length
296-
#endif
297288

298289
/*
299290
* Next we declare some custom display functions for producing more neatly
@@ -417,13 +408,8 @@ static PHP_INI_DISP(nr_framework_dh) {
417408
* Now begin the modify handlers. Firstly, we shall define some compatibility
418409
* macros.
419410
*/
420-
#ifdef PHP7
421411
#define NEW_VALUE new_value->val
422412
#define NEW_VALUE_LEN new_value->len
423-
#else
424-
#define NEW_VALUE new_value
425-
#define NEW_VALUE_LEN new_value_length
426-
#endif /* PHP7 */
427413

428414
/*
429415
* On PHP 5, the arguments to the modify handlers are:
@@ -3527,7 +3513,6 @@ nrobj_t* nr_php_app_settings(void) {
35273513
}
35283514

35293515
int nr_php_ini_setting_is_set_by_user(const char* name) {
3530-
#ifdef PHP7
35313516
int found;
35323517
zend_string* zs;
35333518

@@ -3540,24 +3525,4 @@ int nr_php_ini_setting_is_set_by_user(const char* name) {
35403525
zend_string_free(zs);
35413526

35423527
return found;
3543-
#else
3544-
int zend_rv;
3545-
uint name_length;
3546-
zval default_value;
3547-
3548-
if (0 == name) {
3549-
return 0;
3550-
}
3551-
3552-
name_length = nr_strlen(name) + 1;
3553-
3554-
nr_memset(&default_value, 0, sizeof(default_value));
3555-
3556-
zend_rv = zend_get_configuration_directive(name, name_length, &default_value);
3557-
if (SUCCESS == zend_rv) {
3558-
return 1;
3559-
} else {
3560-
return 0;
3561-
}
3562-
#endif /* PHP7 */
35633528
}

0 commit comments

Comments
 (0)