Skip to content

Commit e018a1c

Browse files
committed
Merge branch 'PHP-7.2'
* PHP-7.2: Fix callbacks bump version
2 parents 580103c + 91a0a10 commit e018a1c

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
@@ -80,7 +80,7 @@ static void com_iter_get_key(zend_object_iterator *iter, zval *key)
8080
}
8181
}
8282

83-
static int com_iter_move_forwards(zend_object_iterator *iter)
83+
static void com_iter_move_forwards(zend_object_iterator *iter)
8484
{
8585
struct php_com_iterator *I = (struct php_com_iterator*)Z_PTR(iter->data);
8686
unsigned long n_fetched;
@@ -101,26 +101,25 @@ static int com_iter_move_forwards(zend_object_iterator *iter)
101101
} else {
102102
/* indicate that there are no more items */
103103
I->key = (ulong)-1;
104-
return FAILURE;
104+
return;
105105
}
106106
} else {
107107
/* safe array */
108108
if (I->key >= (ULONG) I->sa_max) {
109109
I->key = (ulong)-1;
110-
return FAILURE;
110+
return;
111111
}
112112
I->key++;
113113
if (php_com_safearray_get_elem(&I->safe_array, &I->v, (LONG)I->key) == 0) {
114114
I->key = (ulong)-1;
115-
return FAILURE;
115+
return;
116116
}
117117
}
118118

119119
ZVAL_NULL(&ptr);
120120
php_com_zval_from_variant(&ptr, &I->v, I->code_page);
121121
/* php_com_wrap_variant(ptr, &I->v, I->code_page); */
122122
ZVAL_COPY_VALUE(&I->zdata, &ptr);
123-
return SUCCESS;
124123
}
125124

126125

ext/com_dotnet/com_saproxy.c

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

515-
static int saproxy_iter_move_forwards(zend_object_iterator *iter)
515+
static void saproxy_iter_move_forwards(zend_object_iterator *iter)
516516
{
517517
php_com_saproxy_iter *I = (php_com_saproxy_iter*)Z_PTR(iter->data);
518518

519519
if (++I->key >= I->imax) {
520520
I->key = -1;
521-
return FAILURE;
522521
}
523-
return SUCCESS;
524522
}
525523

526524
static const 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
@@ -220,9 +220,9 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
220220
}
221221

222222
/* Type-library stuff */
223-
void php_com_typelibrary_dtor(void *pDest)
223+
void php_com_typelibrary_dtor(zval *pDest)
224224
{
225-
ITypeLib **Lib = (ITypeLib**)pDest;
225+
ITypeLib **Lib = (ITypeLib**)Z_PTR_P(pDest);
226226
ITypeLib_Release(*Lib);
227227
}
228228

ext/com_dotnet/php_com_dotnet_internal.h

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

0 commit comments

Comments
 (0)