Skip to content

Commit 8eeab30

Browse files
committed
ext/opcache/ZendAccelerator: make zps_failure_reason const
1 parent b45b474 commit 8eeab30

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ zend_accel_shared_globals *accel_shared_globals = NULL;
112112
char accel_uname_id[32];
113113
#endif
114114
bool accel_startup_ok = false;
115-
static char *zps_failure_reason = NULL;
116-
char *zps_api_failure_reason = NULL;
115+
static const char *zps_failure_reason = NULL;
116+
const char *zps_api_failure_reason = NULL;
117117
bool file_cache_only = false; /* process uses file cache only */
118118
#if ENABLE_FILE_CACHE_FALLBACK
119119
bool fallback_process = false; /* process uses file cache fallback */
@@ -2936,7 +2936,7 @@ static int accelerator_remove_cb(zend_extension *element1, zend_extension *eleme
29362936
return 0;
29372937
}
29382938

2939-
static void zps_startup_failure(char *reason, char *api_reason, int (*cb)(zend_extension *, zend_extension *))
2939+
static void zps_startup_failure(const char *reason, const char *api_reason, int (*cb)(zend_extension *, zend_extension *))
29402940
{
29412941
accel_startup_ok = false;
29422942
zps_failure_reason = reason;

ext/opcache/ZendAccelerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ ZEND_TSRMLS_CACHE_EXTERN()
320320
extern zend_accel_globals accel_globals;
321321
#endif
322322

323-
extern char *zps_api_failure_reason;
323+
extern const char *zps_api_failure_reason;
324324

325325
BEGIN_EXTERN_C()
326326

0 commit comments

Comments
 (0)