Skip to content

Commit b6adbbb

Browse files
committed
ext/opcache/ZendAccelerator: make zps_failure_reason const
1 parent d971bd3 commit b6adbbb

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 */
@@ -2931,7 +2931,7 @@ static int accelerator_remove_cb(zend_extension *element1, zend_extension *eleme
29312931
return 0;
29322932
}
29332933

2934-
static void zps_startup_failure(char *reason, char *api_reason, int (*cb)(zend_extension *, zend_extension *))
2934+
static void zps_startup_failure(const char *reason, const char *api_reason, int (*cb)(zend_extension *, zend_extension *))
29352935
{
29362936
accel_startup_ok = false;
29372937
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)