diff options
author | Anatol Belski <ab@php.net> | 2018-08-02 18:59:34 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-08-02 18:59:34 +0200 |
commit | 19592519c2803a42762e8fee18505083dc3474fc (patch) | |
tree | 2daab71327193ef5478e7e427f2397cfd3eb3a2c | |
parent | 74988eed9972c498a0fc57f3bd035bab189a03ab (diff) | |
download | php-git-19592519c2803a42762e8fee18505083dc3474fc.tar.gz |
Fix callbacks
The signatures wasn't synced in 7.0
-rw-r--r-- | ext/com_dotnet/com_iterator.c | 9 | ||||
-rw-r--r-- | ext/com_dotnet/com_saproxy.c | 4 | ||||
-rw-r--r-- | ext/com_dotnet/com_typeinfo.c | 4 | ||||
-rw-r--r-- | ext/com_dotnet/php_com_dotnet_internal.h | 2 |
4 files changed, 8 insertions, 11 deletions
diff --git a/ext/com_dotnet/com_iterator.c b/ext/com_dotnet/com_iterator.c index b399ca8828..03db8fd45d 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 09dce26061..4fff134178 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 a0e90df986..7302871bcf 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 4745de9f26..506a14b542 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); |