Skip to content

Commit 1e6128b

Browse files
committed
Fix getenv function
1 parent 17ed118 commit 1e6128b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Zend/zend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ ZEND_API void (*zend_interrupt_function)(zend_execute_data *execute_data);
7878
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint32_t error_lineno, zend_string *message);
7979
void (*zend_printf_to_smart_string)(smart_string *buf, const char *format, va_list ap);
8080
void (*zend_printf_to_smart_str)(smart_str *buf, const char *format, va_list ap);
81-
ZEND_API char *(*zend_getenv)(char *name, size_t name_len);
81+
ZEND_API char *(*zend_getenv)(const char *name, size_t name_len);
8282
ZEND_API zend_string *(*zend_resolve_path)(const char *filename, size_t filename_len);
8383
ZEND_API int (*zend_post_startup_cb)(void) = NULL;
8484
ZEND_API void (*zend_post_shutdown_cb)(void) = NULL;

Zend/zend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ typedef struct _zend_utility_functions {
198198
int (*stream_open_function)(const char *filename, zend_file_handle *handle);
199199
void (*printf_to_smart_string_function)(smart_string *buf, const char *format, va_list ap);
200200
void (*printf_to_smart_str_function)(smart_str *buf, const char *format, va_list ap);
201-
char *(*getenv_function)(char *name, size_t name_len);
201+
char *(*getenv_function)(const char *name, size_t name_len);
202202
zend_string *(*resolve_path_function)(const char *filename, size_t filename_len);
203203
} zend_utility_functions;
204204

@@ -286,7 +286,7 @@ extern ZEND_API void (*zend_on_timeout)(int seconds);
286286
extern ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle);
287287
extern void (*zend_printf_to_smart_string)(smart_string *buf, const char *format, va_list ap);
288288
extern void (*zend_printf_to_smart_str)(smart_str *buf, const char *format, va_list ap);
289-
extern ZEND_API char *(*zend_getenv)(char *name, size_t name_len);
289+
extern ZEND_API char *(*zend_getenv)(const char *name, size_t name_len);
290290
extern ZEND_API zend_string *(*zend_resolve_path)(const char *filename, size_t filename_len);
291291

292292
/* These two callbacks are especially for opcache */

0 commit comments

Comments
 (0)