Skip to content

Commit 91a0a10

Browse files
committed
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fix callbacks bump version
2 parents 0ba4959 + 1959251 commit 91a0a10

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

ext/com_dotnet/com_iterator.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static void com_iter_get_key(zend_object_iterator *iter, zval *key)
8282
}
8383
}
8484

85-
static int com_iter_move_forwards(zend_object_iterator *iter)
85+
static void com_iter_move_forwards(zend_object_iterator *iter)
8686
{
8787
struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data);
8888
unsigned long n_fetched;
@@ -103,26 +103,25 @@ static int com_iter_move_forwards(zend_object_iterator *iter)
103103
} else {
104104
/* indicate that there are no more items */
105105
I->key = (ulong)-1;
106-
return FAILURE;
106+
return;
107107
}
108108
} else {
109109
/* safe array */
110110
if (I->key >= (ULONG) I->sa_max) {
111111
I->key = (ulong)-1;
112-
return FAILURE;
112+
return;
113113
}
114114
I->key++;
115115
if (php_com_safearray_get_elem(&I->safe_array, &I->v, (LONG)I->key) == 0) {
116116
I->key = (ulong)-1;
117-
return FAILURE;
117+
return;
118118
}
119119
}
120120

121121
ZVAL_NULL(&ptr);
122122
php_com_zval_from_variant(&ptr, &I->v, I->code_page);
123123
/* php_com_wrap_variant(ptr, &I->v, I->code_page); */
124124
ZVAL_COPY_VALUE(&I->zdata, &ptr);
125-
return SUCCESS;
126125
}
127126

128127

ext/com_dotnet/com_saproxy.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,15 +514,13 @@ static void saproxy_iter_get_key(zend_object_iterator *iter, zval *key)
514514
}
515515
}
516516

517-
static int saproxy_iter_move_forwards(zend_object_iterator *iter)
517+
static void saproxy_iter_move_forwards(zend_object_iterator *iter)
518518
{
519519
php_com_saproxy_iter *I = (php_com_saproxy_iter*)Z_PTR(iter->data);
520520

521521
if (++I->key >= I->imax) {
522522
I->key = -1;
523-
return FAILURE;
524523
}
525-
return SUCCESS;
526524
}
527525

528526
static zend_object_iterator_funcs saproxy_iter_funcs = {

ext/com_dotnet/com_typeinfo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
223223
}
224224

225225
/* Type-library stuff */
226-
void php_com_typelibrary_dtor(void *pDest)
226+
void php_com_typelibrary_dtor(zval *pDest)
227227
{
228-
ITypeLib **Lib = (ITypeLib**)pDest;
228+
ITypeLib **Lib = (ITypeLib**)Z_PTR_P(pDest);
229229
ITypeLib_Release(*Lib);
230230
}
231231

ext/com_dotnet/php_com_dotnet_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib_via_cache(char *search_string,
174174
PHP_COM_DOTNET_API ITypeLib *php_com_load_typelib(char *search_string, int codepage);
175175
PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode,
176176
int codepage);
177-
void php_com_typelibrary_dtor(void *pDest);
177+
void php_com_typelibrary_dtor(zval *pDest);
178178
ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj, char *dispname, int sink);
179179
int php_com_process_typeinfo(ITypeInfo *typeinfo, HashTable *id_to_name, int printdef, GUID *guid, int codepage);
180180

0 commit comments

Comments
 (0)