diff options
Diffstat (limited to 'ext/com_dotnet')
-rw-r--r-- | ext/com_dotnet/com_com.c | 8 | ||||
-rw-r--r-- | ext/com_dotnet/com_dotnet.c | 2 | ||||
-rw-r--r-- | ext/com_dotnet/com_olechar.c | 4 | ||||
-rw-r--r-- | ext/com_dotnet/com_persist.c | 6 | ||||
-rw-r--r-- | ext/com_dotnet/com_typeinfo.c | 7 | ||||
-rw-r--r-- | ext/com_dotnet/php_com_dotnet_internal.h | 4 |
6 files changed, 16 insertions, 15 deletions
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 002ee7a507..7590ad43c5 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -37,7 +37,7 @@ PHP_FUNCTION(com_create_instance) php_com_dotnet_object *obj; char *module_name, *typelib_name = NULL, *server_name = NULL; char *user_name = NULL, *domain_name = NULL, *password = NULL; - int module_name_len, typelib_name_len, server_name_len, + size_t module_name_len, typelib_name_len, server_name_len, user_name_len, domain_name_len, password_len; OLECHAR *moniker; CLSID clsid; @@ -349,7 +349,7 @@ HRESULT php_com_invoke_helper(php_com_dotnet_object *obj, DISPID id_member, if (silent == 0 && FAILED(hr)) { char *source = NULL, *desc = NULL, *msg = NULL; - int source_len, desc_len; + size_t source_len, desc_len; switch (hr) { case DISP_E_EXCEPTION: @@ -416,7 +416,7 @@ HRESULT php_com_invoke_helper(php_com_dotnet_object *obj, DISPID id_member, /* map an ID to a name */ HRESULT php_com_get_id_of_name(php_com_dotnet_object *obj, char *name, - int namelen, DISPID *dispid TSRMLS_DC) + size_t namelen, DISPID *dispid TSRMLS_DC) { OLECHAR *olename; HRESULT hr; @@ -750,7 +750,7 @@ PHP_FUNCTION(com_print_typeinfo) zval *arg1; char *ifacename = NULL; char *typelibname = NULL; - int ifacelen; + size_t ifacelen; zend_bool wantsink = 0; php_com_dotnet_object *obj = NULL; ITypeInfo *typeinfo; diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c index 9698fb3419..eb13ba8ccd 100644 --- a/ext/com_dotnet/com_dotnet.c +++ b/ext/com_dotnet/com_dotnet.c @@ -188,7 +188,7 @@ PHP_FUNCTION(com_dotnet_create_instance) zval *object = getThis(); php_com_dotnet_object *obj; char *assembly_name, *datatype_name; - int assembly_name_len, datatype_name_len; + size_t assembly_name_len, datatype_name_len; struct dotnet_runtime_stuff *stuff; OLECHAR *oleassembly, *oletype; BSTR oleassembly_sys, oletype_sys; diff --git a/ext/com_dotnet/com_olechar.c b/ext/com_dotnet/com_olechar.c index bf42b4fffb..d12120f54f 100644 --- a/ext/com_dotnet/com_olechar.c +++ b/ext/com_dotnet/com_olechar.c @@ -30,7 +30,7 @@ #include "php_com_dotnet_internal.h" -PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, uint string_len, int codepage TSRMLS_DC) +PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, size_t string_len, int codepage TSRMLS_DC) { OLECHAR *olestring = NULL; DWORD flags = codepage == CP_UTF8 ? 0 : MB_PRECOMPOSED | MB_ERR_INVALID_CHARS; @@ -71,7 +71,7 @@ PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, uint strin return olestring; } -PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, int codepage TSRMLS_DC) +PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring, size_t *string_len, int codepage TSRMLS_DC) { char *string; uint length = 0; diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c index 0b496404f4..a1c2f77661 100644 --- a/ext/com_dotnet/com_persist.c +++ b/ext/com_dotnet/com_persist.c @@ -349,7 +349,7 @@ CPH_METHOD(GetCurFileName) res = IPersistFile_GetCurFile(helper->ipf, &olename); if (res == S_OK) { - int len; + size_t len; char *str = php_com_olestring_to_string(olename, &len, helper->codepage TSRMLS_CC); RETVAL_STRINGL(str, len); @@ -375,7 +375,7 @@ CPH_METHOD(SaveToFile) { HRESULT res; char *filename, *fullpath = NULL; - int filename_len; + size_t filename_len; zend_bool remember = TRUE; OLECHAR *olefilename = NULL; CPH_FETCH(); @@ -438,7 +438,7 @@ CPH_METHOD(LoadFromFile) { HRESULT res; char *filename, *fullpath; - int filename_len; + size_t filename_len; zend_long flags = 0; OLECHAR *olefilename; CPH_FETCH(); diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index b32c4b2600..eefa28dd3a 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -164,7 +164,7 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa zend_constant c; zval *exists, results, value; char *const_name; - int len; + size_t len; if (TL == NULL) { return FAILURE; @@ -437,7 +437,7 @@ int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int pri int i; OLECHAR *olename; char *ansiname = NULL; - unsigned int ansinamelen; + size_t ansinamelen; int ret = 0; if (FAILED(ITypeInfo_GetTypeAttr(typeinfo, &attr))) { @@ -491,7 +491,8 @@ int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int pri if (printdef) { int j; char *funcdesc; - unsigned int funcdesclen, cnames = 0; + size_t funcdesclen; + unsigned int cnames = 0; BSTR *names; names = (BSTR*)safe_emalloc((func->cParams + 1), sizeof(BSTR), 0); diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h index b893523748..f153883006 100644 --- a/ext/com_dotnet/php_com_dotnet_internal.h +++ b/ext/com_dotnet/php_com_dotnet_internal.h @@ -87,9 +87,9 @@ int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index TSRMLS /* com_olechar.c */ PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring, - uint *string_len, int codepage TSRMLS_DC); + size_t *string_len, int codepage TSRMLS_DC); PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, - uint string_len, int codepage TSRMLS_DC); + size_t string_len, int codepage TSRMLS_DC); /* com_com.c */ |