summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-08-02 21:40:50 +0200
committerAnatol Belski <ab@php.net>2018-08-02 21:40:50 +0200
commitcd07fa48ba74d52bfe700e50dd308d78ac607f55 (patch)
treec6495c36faa0024d23c2f3fb612740ade16625c4
parent9d7c510893b7e3648fceaa14620e7d9b04721c0f (diff)
parent91a0a10f715d1c32adab83b55bd970cfbaba9721 (diff)
downloadphp-git-cd07fa48ba74d52bfe700e50dd308d78ac607f55.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fix callbacks bump version
-rw-r--r--ext/com_dotnet/com_iterator.c9
-rw-r--r--ext/com_dotnet/com_saproxy.c4
-rw-r--r--ext/com_dotnet/com_typeinfo.c4
-rw-r--r--ext/com_dotnet/php_com_dotnet_internal.h2
4 files changed, 8 insertions, 11 deletions
diff --git a/ext/com_dotnet/com_iterator.c b/ext/com_dotnet/com_iterator.c
index 48dec98fe3..ed1deb9691 100644
--- a/ext/com_dotnet/com_iterator.c
+++ b/ext/com_dotnet/com_iterator.c
@@ -80,7 +80,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;
@@ -101,18 +101,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;
}
}
@@ -120,7 +120,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 a8cd9b9214..68c814f4b4 100644
--- a/ext/com_dotnet/com_saproxy.c
+++ b/ext/com_dotnet/com_saproxy.c
@@ -512,15 +512,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 const zend_object_iterator_funcs saproxy_iter_funcs = {
diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c
index f9f6f6aa9a..cde987bb8b 100644
--- a/ext/com_dotnet/com_typeinfo.c
+++ b/ext/com_dotnet/com_typeinfo.c
@@ -220,9 +220,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 b7be4c34fd..a2fe813683 100644
--- a/ext/com_dotnet/php_com_dotnet_internal.h
+++ b/ext/com_dotnet/php_com_dotnet_internal.h
@@ -172,7 +172,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);