From 88355dd338835f7a59415ecb2e7e970658f3867f Mon Sep 17 00:00:00 2001 From: twosee Date: Sun, 7 Jun 2020 17:01:19 +0800 Subject: Constify char * arguments of APIs Closes GH-5676. --- ext/com_dotnet/com_olechar.c | 2 +- ext/com_dotnet/com_typeinfo.c | 2 +- ext/com_dotnet/php_com_dotnet_internal.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/com_dotnet') diff --git a/ext/com_dotnet/com_olechar.c b/ext/com_dotnet/com_olechar.c index 665773b120..7eda51b73b 100644 --- a/ext/com_dotnet/com_olechar.c +++ b/ext/com_dotnet/com_olechar.c @@ -26,7 +26,7 @@ #include "php_com_dotnet_internal.h" -PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, size_t string_len, int codepage) +PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(const char *string, size_t string_len, int codepage) { OLECHAR *olestring = NULL; DWORD flags = codepage == CP_UTF8 ? 0 : MB_PRECOMPOSED | MB_ERR_INVALID_CHARS; diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index acd2e3d512..ffd2400f75 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -260,7 +260,7 @@ ITypeLib *php_com_cache_typelib(ITypeLib* TL, char *cache_key, zend_long cache_k return result; } -PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string, +PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(const char *search_string, int codepage, int *cached) { ITypeLib *TL; diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h index 8521277083..4974bb78e3 100644 --- a/ext/com_dotnet/php_com_dotnet_internal.h +++ b/ext/com_dotnet/php_com_dotnet_internal.h @@ -82,7 +82,7 @@ int php_com_saproxy_create(zend_object *com_object, zval *proxy_out, zval *index /* com_olechar.c */ PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring, size_t *string_len, int codepage); -PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, +PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(const char *string, size_t string_len, int codepage); @@ -130,7 +130,7 @@ PHP_COM_DOTNET_API void php_com_wrap_variant(zval *z, VARIANT *v, PHP_COM_DOTNET_API int php_com_safearray_get_elem(VARIANT *array, VARIANT *dest, LONG dim1); /* com_typeinfo.c */ -PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string, +PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(const char *search_string, int codepage, int *cached); PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codepage); PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, -- cgit v1.2.1