com php-src: Fix callbacks: ext/com_dotnet/com_iterator.c ext/com_dotnet/com_saproxy.c ext/com_dotnet/com_ typeinfo.c
ext/com_dotnet/php_com_dotnet_internal .h

From: Date: Thu, 02 Aug 2018 16:59:34 +0000
Subject: com php-src: Fix callbacks: ext/com_dotnet/com_iterator.c ext/com_dotnet/com_saproxy.c ext/com_dotnet/com_ typeinfo.c
ext/com_dotnet/php_com_dotnet_internal .h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102789@lists.php.net to get a copy of this message
Commit: 19592519c2803a42762e8fee18505083dc3474fc Author: Anatol Belski <ab@php.net> Thu, 2 Aug 2018 18:59:34 +0200 Parents: 74988eed9972c498a0fc57f3bd035bab189a03ab Branches: PHP-7.1 PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=19592519c2803a42762e8fee18505083dc3474fc Log: Fix callbacks The signatures wasn't synced in 7.0 Changed paths: M ext/com_dotnet/com_iterator.c M ext/com_dotnet/com_saproxy.c M ext/com_dotnet/com_typeinfo.c M ext/com_dotnet/php_com_dotnet_internal.h Diff: diff --git a/ext/com_dotnet/com_iterator.c b/ext/com_dotnet/com_iterator.c index b399ca8..03db8fd 100644 --- a/ext/com_dotnet/com_iterator.c +++ b/ext/com_dotnet/com_iterator.c @@ -82,7 +82,7 @@ static void com_iter_get_key(zend_object_iterator *iter, zval *key) } } -static int com_iter_move_forwards(zend_object_iterator *iter) +static void com_iter_move_forwards(zend_object_iterator *iter) { struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data); unsigned long n_fetched; @@ -103,18 +103,18 @@ static int com_iter_move_forwards(zend_object_iterator *iter) } else { /* indicate that there are no more items */ I->key = (ulong)-1; - return FAILURE; + return; } } else { /* safe array */ if (I->key >= (ULONG) I->sa_max) { I->key = (ulong)-1; - return FAILURE; + return; } I->key++; if (php_com_safearray_get_elem(&I->safe_array, &I->v, (LONG)I->key) == 0) { I->key = (ulong)-1; - return FAILURE; + return; } } @@ -122,7 +122,6 @@ static int com_iter_move_forwards(zend_object_iterator *iter) php_com_zval_from_variant(&ptr, &I->v, I->code_page); /* php_com_wrap_variant(ptr, &I->v, I->code_page); */ ZVAL_COPY_VALUE(&I->zdata, &ptr); - return SUCCESS; } diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c index 09dce26..4fff134 100644 --- a/ext/com_dotnet/com_saproxy.c +++ b/ext/com_dotnet/com_saproxy.c @@ -514,15 +514,13 @@ static void saproxy_iter_get_key(zend_object_iterator *iter, zval *key) } } -static int saproxy_iter_move_forwards(zend_object_iterator *iter) +static void saproxy_iter_move_forwards(zend_object_iterator *iter) { php_com_saproxy_iter *I = (php_com_saproxy_iter*)Z_PTR(iter->data); if (++I->key >= I->imax) { I->key = -1; - return FAILURE; } - return SUCCESS; } static zend_object_iterator_funcs saproxy_iter_funcs = { diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index a0e90df..7302871 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -223,9 +223,9 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa } /* Type-library stuff */ -void php_com_typelibrary_dtor(void *pDest) +void php_com_typelibrary_dtor(zval *pDest) { - ITypeLib **Lib = (ITypeLib**)pDest; + ITypeLib **Lib = (ITypeLib**)Z_PTR_P(pDest); ITypeLib_Release(*Lib); } diff --git a/ext/com_dotnet/php_com_dotnet_internal..h b/ext/com_dotnet/php_com_dotnet_internal.h index 4745de9..506a14b 100644 --- a/ext/com_dotnet/php_com_dotnet_internal.h +++ b/ext/com_dotnet/php_com_dotnet_internal.h @@ -174,7 +174,7 @@ PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string, 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, int codepage); -void php_com_typelibrary_dtor(void *pDest); +void php_com_typelibrary_dtor(zval *pDest); ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj, char *dispname, int sink); int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int printdef, GUID *guid, int codepage);

« previous php.cvs (#102789) next »