summaryrefslogtreecommitdiff
path: root/ext/com_dotnet
diff options
context:
space:
mode:
Diffstat (limited to 'ext/com_dotnet')
-rw-r--r--ext/com_dotnet/com_com.c14
-rw-r--r--ext/com_dotnet/com_dotnet.c3
-rw-r--r--ext/com_dotnet/com_extension.c130
-rw-r--r--ext/com_dotnet/com_extension.stub.php67
-rw-r--r--ext/com_dotnet/com_extension_arginfo.h110
-rw-r--r--ext/com_dotnet/com_handlers.c158
-rw-r--r--ext/com_dotnet/com_iterator.c2
-rw-r--r--ext/com_dotnet/com_misc.c2
-rw-r--r--ext/com_dotnet/com_olechar.c2
-rw-r--r--ext/com_dotnet/com_persist.c12
-rw-r--r--ext/com_dotnet/com_saproxy.c82
-rw-r--r--ext/com_dotnet/com_typeinfo.c2
-rw-r--r--ext/com_dotnet/com_variant.c3
-rw-r--r--ext/com_dotnet/com_wrapper.c2
-rw-r--r--ext/com_dotnet/php_com_dotnet.h2
-rw-r--r--ext/com_dotnet/php_com_dotnet_internal.h6
16 files changed, 306 insertions, 291 deletions
diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c
index 58a22a9c62..90972b93df 100644
--- a/ext/com_dotnet/com_com.c
+++ b/ext/com_dotnet/com_com.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -60,12 +58,10 @@ PHP_FUNCTION(com_create_instance)
ZEND_NUM_ARGS(), "s|s!ls",
&module_name, &module_name_len, &server_name, &server_name_len,
&cp, &typelib_name, &typelib_name_len) &&
- FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
+ FAILURE == zend_parse_parameters(
ZEND_NUM_ARGS(), "sa|ls",
&module_name, &module_name_len, &server_params, &cp,
&typelib_name, &typelib_name_len)) {
-
- php_com_throw_exception(E_INVALIDARG, "Could not create COM object - invalid arguments!");
return;
}
@@ -302,7 +298,6 @@ PHP_FUNCTION(com_get_active_object)
php_com_initialize();
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "s|l",
&module_name, &module_name_len, &code_page)) {
- php_com_throw_exception(E_INVALIDARG, "Invalid arguments!");
return;
}
@@ -704,7 +699,7 @@ PHP_FUNCTION(com_event_sink)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "Oo|z/",
&object, php_com_variant_class_entry, &sinkobject, &sink)) {
- RETURN_FALSE;
+ return;
}
php_com_initialize();
@@ -765,7 +760,7 @@ PHP_FUNCTION(com_print_typeinfo)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "z/|s!b", &arg1, &ifacename,
&ifacelen, &wantsink)) {
- RETURN_FALSE;
+ return;
}
php_com_initialize();
@@ -832,7 +827,8 @@ PHP_FUNCTION(com_load_typelib)
}
if (!cs) {
- php_error_docref(NULL, E_DEPRECATED, "Declaration of case-insensitive constants is deprecated");
+ php_error_docref(NULL, E_WARNING, "Declaration of case-insensitive constants is no longer supported");
+ RETURN_FALSE;
}
RETVAL_FALSE;
diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c
index 7222615986..40fb6479b1 100644
--- a/ext/com_dotnet/com_dotnet.c
+++ b/ext/com_dotnet/com_dotnet.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -243,7 +241,6 @@ PHP_FUNCTION(com_dotnet_create_instance)
&assembly_name, &assembly_name_len,
&datatype_name, &datatype_name_len,
&cp)) {
- php_com_throw_exception(E_INVALIDARG, "Could not create .Net object - invalid arguments!");
return;
}
diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c
index 7ff0fd0ebd..8dc7133534 100644
--- a/ext/com_dotnet/com_extension.c
+++ b/ext/com_dotnet/com_extension.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -29,6 +27,7 @@
#include "php_com_dotnet_internal.h"
#include "Zend/zend_exceptions.h"
#include "Zend/zend_interfaces.h"
+#include "com_extension_arginfo.h"
ZEND_DECLARE_MODULE_GLOBALS(com_dotnet)
static PHP_GINIT_FUNCTION(com_dotnet);
@@ -38,116 +37,21 @@ zend_class_entry
*php_com_exception_class_entry,
*php_com_saproxy_class_entry;
-/* {{{ arginfo */
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_set, 0, 0, 2)
- ZEND_ARG_INFO(0, variant)
- ZEND_ARG_INFO(0, value)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_left_right, 0, 0, 2)
- ZEND_ARG_INFO(0, left)
- ZEND_ARG_INFO(0, right)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_abs, 0, 0, 1)
- ZEND_ARG_INFO(0, left)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_fix, 0, 0, 1)
- ZEND_ARG_INFO(0, left)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_int, 0, 0, 1)
- ZEND_ARG_INFO(0, left)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_neg, 0, 0, 1)
- ZEND_ARG_INFO(0, left)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_not, 0, 0, 1)
- ZEND_ARG_INFO(0, left)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_round, 0, 0, 2)
- ZEND_ARG_INFO(0, left)
- ZEND_ARG_INFO(0, decimals)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_cmp, 0, 0, 2)
- ZEND_ARG_INFO(0, left)
- ZEND_ARG_INFO(0, right)
- ZEND_ARG_INFO(0, lcid)
- ZEND_ARG_INFO(0, flags)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_date_to_timestamp, 0, 0, 1)
- ZEND_ARG_INFO(0, variant)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_date_from_timestamp, 0, 0, 1)
- ZEND_ARG_INFO(0, timestamp)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_get_type, 0, 0, 1)
- ZEND_ARG_INFO(0, variant)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_set_type, 0, 0, 2)
- ZEND_ARG_INFO(0, variant)
- ZEND_ARG_INFO(0, type)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_cast, 0, 0, 2)
- ZEND_ARG_INFO(0, variant)
- ZEND_ARG_INFO(0, type)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_com_get_active_object, 0, 0, 1)
- ZEND_ARG_INFO(0, progid)
- ZEND_ARG_INFO(0, code_page)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO(arginfo_com_create_guid, 0)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_com_event_sink, 0, 0, 2)
- ZEND_ARG_INFO(0, comobject)
- ZEND_ARG_INFO(0, sinkobject)
- ZEND_ARG_INFO(0, sinkinterface)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_com_print_typeinfo, 0, 0, 1)
- ZEND_ARG_INFO(0, comobject)
- ZEND_ARG_INFO(0, dispinterface)
- ZEND_ARG_INFO(0, wantsink)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_com_message_pump, 0, 0, 0)
- ZEND_ARG_INFO(0, timeoutms)
-ZEND_END_ARG_INFO()
-
-ZEND_BEGIN_ARG_INFO_EX(arginfo_com_load_typelib, 0, 0, 1)
- ZEND_ARG_INFO(0, typelib_name)
- ZEND_ARG_INFO(0, case_insensitive)
-ZEND_END_ARG_INFO()
-/* }}} */
-
static const zend_function_entry com_dotnet_functions[] = {
PHP_FE(variant_set, arginfo_variant_set)
- PHP_FE(variant_add, arginfo_left_right)
- PHP_FE(variant_cat, arginfo_left_right)
- PHP_FE(variant_sub, arginfo_left_right)
- PHP_FE(variant_mul, arginfo_left_right)
- PHP_FE(variant_and, arginfo_left_right)
- PHP_FE(variant_div, arginfo_left_right)
- PHP_FE(variant_eqv, arginfo_left_right)
- PHP_FE(variant_idiv, arginfo_left_right)
- PHP_FE(variant_imp, arginfo_left_right)
- PHP_FE(variant_mod, arginfo_left_right)
- PHP_FE(variant_or, arginfo_left_right)
- PHP_FE(variant_pow, arginfo_left_right)
- PHP_FE(variant_xor, arginfo_left_right)
+ PHP_FE(variant_add, arginfo_variant_add)
+ PHP_FE(variant_cat, arginfo_variant_add)
+ PHP_FE(variant_sub, arginfo_variant_add)
+ PHP_FE(variant_mul, arginfo_variant_add)
+ PHP_FE(variant_and, arginfo_variant_add)
+ PHP_FE(variant_div, arginfo_variant_add)
+ PHP_FE(variant_eqv, arginfo_variant_add)
+ PHP_FE(variant_idiv, arginfo_variant_add)
+ PHP_FE(variant_imp, arginfo_variant_add)
+ PHP_FE(variant_mod, arginfo_variant_add)
+ PHP_FE(variant_or, arginfo_variant_add)
+ PHP_FE(variant_pow, arginfo_variant_add)
+ PHP_FE(variant_xor, arginfo_variant_add)
PHP_FE(variant_abs, arginfo_variant_abs)
PHP_FE(variant_fix, arginfo_variant_fix)
PHP_FE(variant_int, arginfo_variant_int)
@@ -235,8 +139,7 @@ static PHP_INI_MH(OnTypeLibFileUpdate)
modifier = php_strtok_r(NULL, "#", &strtok_buf);
if (modifier != NULL) {
if (!strcmp(modifier, "cis") || !strcmp(modifier, "case_insensitive")) {
- php_error_docref("com.configuration", E_DEPRECATED, "Declaration of case-insensitive constants is deprecated");
- mode &= ~CONST_CS;
+ php_error_docref("com.configuration", E_WARNING, "Declaration of case-insensitive constants is no longer supported; #cis modifier ignored");
}
}
@@ -267,7 +170,8 @@ static PHP_INI_MH(OnTypeLibFileUpdate)
static ZEND_INI_MH(OnAutoregisterCasesensitive)
{
if (!zend_ini_parse_bool(new_value)) {
- php_error_docref("com.configuration", E_DEPRECATED, "Declaration of case-insensitive constants is deprecated");
+ php_error_docref("com.configuration", E_WARNING, "Declaration of case-insensitive constants is no longer supported");
+ return FAILURE;
}
return OnUpdateBool(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage);
}
diff --git a/ext/com_dotnet/com_extension.stub.php b/ext/com_dotnet/com_extension.stub.php
new file mode 100644
index 0000000000..34ff543297
--- /dev/null
+++ b/ext/com_dotnet/com_extension.stub.php
@@ -0,0 +1,67 @@
+<?php
+
+function variant_set(variant $variant, $value): void {}
+
+function variant_add($left, $right): variant {}
+
+function variant_cat($left, $right): variant {}
+
+function variant_sub($left, $right): variant {}
+
+function variant_mul($left, $right): variant {}
+
+function variant_and($left, $right): variant {}
+
+function variant_div($left, $right): variant {}
+
+function variant_eqv($left, $right): variant {}
+
+function variant_idiv($left, $right): variant {}
+
+function variant_imp($left, $right): variant {}
+
+function variant_mod($left, $right): variant {}
+
+function variant_or($left, $right): variant {}
+
+function variant_pow($left, $right): variant {}
+
+function variant_xor($left, $right): variant {}
+
+function variant_abs($left): variant {}
+
+function variant_fix($left): variant {}
+
+function variant_int($left): variant {}
+
+function variant_neg($left): variant {}
+
+function variant_not($left): variant {}
+
+function variant_round($left, int $decimals): ?variant {}
+
+function variant_cmp($left, $right, int $lcid = UNKNOWN, int $flags = 0) {}
+
+function variant_date_to_timestamp(variant $variant): ?int {}
+
+/** @return variant|false */
+function variant_date_from_timestamp(int $timestamp) {}
+
+function variant_get_type(variant $variant): int {}
+
+function variant_set_type(variant $variant, int $type): void {}
+
+function variant_cast(variant $variant, int $type): variant {}
+
+function com_get_active_object(string $progid, int $code_page = UNKNOWN): variant {}
+
+/** @return string|false */
+function com_create_guid() {}
+
+function com_event_sink(variant $comobject, object $sinkobject, $sinkinterface = UNKNOWN): bool {}
+
+function com_print_typeinfo($comobject, ?string $dispinterface = null, bool $wantsink = false): bool {}
+
+function com_message_pump(int $timeoutms = 0): bool {}
+
+function com_load_typelib(string $typelib_name, bool $case_insensitive = true) {}
diff --git a/ext/com_dotnet/com_extension_arginfo.h b/ext/com_dotnet/com_extension_arginfo.h
new file mode 100644
index 0000000000..b2f7d0a09c
--- /dev/null
+++ b/ext/com_dotnet/com_extension_arginfo.h
@@ -0,0 +1,110 @@
+/* This is a generated file, edit the .stub.php file instead. */
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_set, 0, 2, IS_VOID, 0)
+ ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_add, 0, 2, variant, 0)
+ ZEND_ARG_INFO(0, left)
+ ZEND_ARG_INFO(0, right)
+ZEND_END_ARG_INFO()
+
+#define arginfo_variant_cat arginfo_variant_add
+
+#define arginfo_variant_sub arginfo_variant_add
+
+#define arginfo_variant_mul arginfo_variant_add
+
+#define arginfo_variant_and arginfo_variant_add
+
+#define arginfo_variant_div arginfo_variant_add
+
+#define arginfo_variant_eqv arginfo_variant_add
+
+#define arginfo_variant_idiv arginfo_variant_add
+
+#define arginfo_variant_imp arginfo_variant_add
+
+#define arginfo_variant_mod arginfo_variant_add
+
+#define arginfo_variant_or arginfo_variant_add
+
+#define arginfo_variant_pow arginfo_variant_add
+
+#define arginfo_variant_xor arginfo_variant_add
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_abs, 0, 1, variant, 0)
+ ZEND_ARG_INFO(0, left)
+ZEND_END_ARG_INFO()
+
+#define arginfo_variant_fix arginfo_variant_abs
+
+#define arginfo_variant_int arginfo_variant_abs
+
+#define arginfo_variant_neg arginfo_variant_abs
+
+#define arginfo_variant_not arginfo_variant_abs
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_round, 0, 2, variant, 1)
+ ZEND_ARG_INFO(0, left)
+ ZEND_ARG_TYPE_INFO(0, decimals, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_cmp, 0, 0, 2)
+ ZEND_ARG_INFO(0, left)
+ ZEND_ARG_INFO(0, right)
+ ZEND_ARG_TYPE_INFO(0, lcid, IS_LONG, 0)
+ ZEND_ARG_TYPE_INFO(0, flags, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_date_to_timestamp, 0, 1, IS_LONG, 1)
+ ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_variant_date_from_timestamp, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_get_type, 0, 1, IS_LONG, 0)
+ ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_set_type, 0, 2, IS_VOID, 0)
+ ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
+ ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_variant_cast, 0, 2, variant, 0)
+ ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
+ ZEND_ARG_TYPE_INFO(0, type, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_com_get_active_object, 0, 1, variant, 0)
+ ZEND_ARG_TYPE_INFO(0, progid, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, code_page, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_com_create_guid, 0, 0, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_event_sink, 0, 2, _IS_BOOL, 0)
+ ZEND_ARG_OBJ_INFO(0, comobject, variant, 0)
+ ZEND_ARG_TYPE_INFO(0, sinkobject, IS_OBJECT, 0)
+ ZEND_ARG_INFO(0, sinkinterface)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_print_typeinfo, 0, 1, _IS_BOOL, 0)
+ ZEND_ARG_INFO(0, comobject)
+ ZEND_ARG_TYPE_INFO(0, dispinterface, IS_STRING, 1)
+ ZEND_ARG_TYPE_INFO(0, wantsink, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_com_message_pump, 0, 0, _IS_BOOL, 0)
+ ZEND_ARG_TYPE_INFO(0, timeoutms, IS_LONG, 0)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_com_load_typelib, 0, 0, 1)
+ ZEND_ARG_TYPE_INFO(0, typelib_name, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, case_insensitive, _IS_BOOL, 0)
+ZEND_END_ARG_INFO()
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c
index fe39e2f9e0..1a5d9c3046 100644
--- a/ext/com_dotnet/com_handlers.c
+++ b/ext/com_dotnet/com_handlers.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -27,7 +25,7 @@
#include "php_com_dotnet_internal.h"
#include "Zend/zend_exceptions.h"
-static zval *com_property_read(zval *object, zval *member, int type, void **cahce_slot, zval *rv)
+static zval *com_property_read(zend_object *object, zend_string *member, int type, void **cahce_slot, zval *rv)
{
php_com_dotnet_object *obj;
VARIANT v;
@@ -35,21 +33,22 @@ static zval *com_property_read(zval *object, zval *member, int type, void **cahc
ZVAL_NULL(rv);
- obj = CDNO_FETCH(object);
+ obj = (php_com_dotnet_object*) object;
if (V_VT(&obj->v) == VT_DISPATCH) {
VariantInit(&v);
- convert_to_string_ex(member);
-
- res = php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member),
+ res = php_com_do_invoke(obj, ZSTR_VAL(member), ZSTR_LEN(member),
DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, 0, NULL, 1);
if (res == SUCCESS) {
php_com_zval_from_variant(rv, &v, obj->code_page);
VariantClear(&v);
} else if (res == DISP_E_BADPARAMCOUNT) {
- php_com_saproxy_create(object, rv, member);
+ zval zv;
+
+ ZVAL_STR(&zv, member);
+ php_com_saproxy_create(object, rv, &zv);
}
} else {
php_com_throw_exception(E_INVALIDARG, "this variant has no properties");
@@ -58,18 +57,17 @@ static zval *com_property_read(zval *object, zval *member, int type, void **cahc
return rv;
}
-static zval *com_property_write(zval *object, zval *member, zval *value, void **cache_slot)
+static zval *com_property_write(zend_object *object, zend_string *member, zval *value, void **cache_slot)
{
php_com_dotnet_object *obj;
VARIANT v;
- obj = CDNO_FETCH(object);
+ obj = (php_com_dotnet_object*) object;
if (V_VT(&obj->v) == VT_DISPATCH) {
VariantInit(&v);
- convert_to_string_ex(member);
- if (SUCCESS == php_com_do_invoke(obj, Z_STRVAL_P(member), Z_STRLEN_P(member),
+ if (SUCCESS == php_com_do_invoke(obj, ZSTR_VAL(member), ZSTR_LEN(member),
DISPATCH_PROPERTYPUT|DISPATCH_PROPERTYPUTREF, &v, 1, value, 0)) {
VariantClear(&v);
}
@@ -79,14 +77,14 @@ static zval *com_property_write(zval *object, zval *member, zval *value, void **
return value;
}
-static zval *com_read_dimension(zval *object, zval *offset, int type, zval *rv)
+static zval *com_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
php_com_dotnet_object *obj;
VARIANT v;
ZVAL_NULL(rv);
- obj = CDNO_FETCH(object);
+ obj = (php_com_dotnet_object*) object;
if (V_VT(&obj->v) == VT_DISPATCH) {
VariantInit(&v);
@@ -115,14 +113,14 @@ static zval *com_read_dimension(zval *object, zval *offset, int type, zval *rv)
return rv;
}
-static void com_write_dimension(zval *object, zval *offset, zval *value)
+static void com_write_dimension(zend_object *object, zval *offset, zval *value)
{
php_com_dotnet_object *obj;
zval args[2];
VARIANT v;
HRESULT res;
- obj = CDNO_FETCH(object);
+ obj = (php_com_dotnet_object*) object;
if (offset == NULL) {
php_com_throw_exception(DISP_E_BADINDEX, "appending to variants is not supported");
@@ -184,29 +182,15 @@ static zval *com_get_property_ptr_ptr(zval *object, zval *member, int type, void
return NULL;
}
-#if 0
-static void com_object_set(zval **property, zval *value)
-{
- /* Not yet implemented in the engine */
-}
-
-static zval *com_object_get(zval *property)
-{
- /* Not yet implemented in the engine */
- return NULL;
-}
-#endif
-
-static int com_property_exists(zval *object, zval *member, int check_empty, void **cache_slot)
+static int com_property_exists(zend_object *object, zend_string *member, int check_empty, void **cache_slot)
{
DISPID dispid;
php_com_dotnet_object *obj;
- obj = CDNO_FETCH(object);
+ obj = (php_com_dotnet_object*) object;
if (V_VT(&obj->v) == VT_DISPATCH) {
- convert_to_string_ex(member);
- if (SUCCEEDED(php_com_get_id_of_name(obj, Z_STRVAL_P(member), Z_STRLEN_P(member), &dispid))) {
+ if (SUCCEEDED(php_com_get_id_of_name(obj, ZSTR_VAL(member), ZSTR_LEN(member), &dispid))) {
/* TODO: distinguish between property and method! */
return 1;
}
@@ -217,23 +201,23 @@ static int com_property_exists(zval *object, zval *member, int check_empty, void
return 0;
}
-static int com_dimension_exists(zval *object, zval *member, int check_empty)
+static int com_dimension_exists(zend_object *object, zval *member, int check_empty)
{
php_error_docref(NULL, E_WARNING, "Operation not yet supported on a COM object");
return 0;
}
-static void com_property_delete(zval *object, zval *member, void **cache_slot)
+static void com_property_delete(zend_object *object, zend_string *member, void **cache_slot)
{
php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object");
}
-static void com_dimension_delete(zval *object, zval *offset)
+static void com_dimension_delete(zend_object *object, zval *offset)
{
php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object");
}
-static HashTable *com_properties_get(zval *object)
+static HashTable *com_properties_get(zend_object *object)
{
/* TODO: use type-info to get all the names and values ?
* DANGER: if we do that, there is a strong possibility for
@@ -257,11 +241,42 @@ static void function_dtor(zval *zv)
static PHP_FUNCTION(com_method_handler)
{
zval *object = getThis();
+ zend_string *method = EX(func)->common.function_name;
+ zval *args = NULL;
+ php_com_dotnet_object *obj = CDNO_FETCH(object);
+ int nargs;
+ VARIANT v;
+ int ret = FAILURE;
+
+ if (V_VT(&obj->v) != VT_DISPATCH) {
+ goto exit;
+ }
- Z_OBJ_HANDLER_P(object, call_method)(
- ((zend_internal_function*)EX(func))->function_name,
- Z_OBJ_P(object),
- INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ nargs = ZEND_NUM_ARGS();
+
+ if (nargs) {
+ args = (zval *)safe_emalloc(sizeof(zval), nargs, 0);
+ zend_get_parameters_array_ex(nargs, args);
+ }
+
+ VariantInit(&v);
+
+ if (SUCCESS == php_com_do_invoke_byref(obj, (zend_internal_function*)EX(func), DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, nargs, args)) {
+ php_com_zval_from_variant(return_value, &v, obj->code_page);
+ ret = SUCCESS;
+ VariantClear(&v);
+ }
+
+ if (args) {
+ efree(args);
+ }
+
+exit:
+ /* Cleanup trampoline */
+ ZEND_ASSERT(EX(func)->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE);
+ zend_string_release(EX(func)->common.function_name);
+ zend_free_trampoline(EX(func));
+ EX(func) = NULL;
}
static zend_function *com_method_get(zend_object **object_ptr, zend_string *name, const zval *key)
@@ -281,7 +296,8 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name
/* check cache */
if (obj->method_cache == NULL || NULL == (fptr = zend_hash_find_ptr(obj->method_cache, name))) {
- f.type = ZEND_OVERLOADED_FUNCTION;
+ memset(&f, 0, sizeof(zend_internal_function));
+ f.type = ZEND_INTERNAL_FUNCTION;
f.num_args = 0;
f.arg_info = NULL;
f.scope = obj->ce;
@@ -311,7 +327,7 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name
f.arg_info = ecalloc(bindptr.lpfuncdesc->cParams, sizeof(zend_arg_info));
for (i = 0; i < bindptr.lpfuncdesc->cParams; i++) {
- f.arg_info[i].type = ZEND_TYPE_ENCODE(0,1);
+ f.arg_info[i].type = ZEND_TYPE_ENCODE_NONE();
if (bindptr.lpfuncdesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOUT) {
f.arg_info[i].pass_by_reference = ZEND_SEND_BY_REF;
}
@@ -356,6 +372,7 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name
if (fptr) {
/* duplicate this into a new chunk of emalloc'd memory,
* since the engine will efree it */
+ zend_string_addref(fptr->function_name);
func = emalloc(sizeof(*fptr));
memcpy(func, fptr, sizeof(*fptr));
@@ -365,40 +382,6 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name
return NULL;
}
-static int com_call_method(zend_string *method, zend_object *object, INTERNAL_FUNCTION_PARAMETERS)
-{
- zval *args = NULL;
- php_com_dotnet_object *obj = (php_com_dotnet_object*)object;
- int nargs;
- VARIANT v;
- int ret = FAILURE;
-
- if (V_VT(&obj->v) != VT_DISPATCH) {
- return FAILURE;
- }
-
- nargs = ZEND_NUM_ARGS();
-
- if (nargs) {
- args = (zval *)safe_emalloc(sizeof(zval), nargs, 0);
- zend_get_parameters_array_ex(nargs, args);
- }
-
- VariantInit(&v);
-
- if (SUCCESS == php_com_do_invoke_byref(obj, (zend_internal_function*)EX(func), DISPATCH_METHOD|DISPATCH_PROPERTYGET, &v, nargs, args)) {
- php_com_zval_from_variant(return_value, &v, obj->code_page);
- ret = SUCCESS;
- VariantClear(&v);
- }
-
- if (args) {
- efree(args);
- }
-
- return ret;
-}
-
static zend_function *com_constructor_get(zend_object *object)
{
php_com_dotnet_object *obj = (php_com_dotnet_object *) object;
@@ -449,6 +432,8 @@ static int com_objects_compare(zval *object1, zval *object2)
* So, we have this declaration here to fix it */
STDAPI VarCmp(LPVARIANT pvarLeft, LPVARIANT pvarRight, LCID lcid, DWORD flags);
+ ZEND_COMPARE_OBJECTS_FALLBACK(object1, object2);
+
obja = CDNO_FETCH(object1);
objb = CDNO_FETCH(object2);
@@ -471,14 +456,14 @@ static int com_objects_compare(zval *object1, zval *object2)
return ret;
}
-static int com_object_cast(zval *readobj, zval *writeobj, int type)
+static int com_object_cast(zend_object *readobj, zval *writeobj, int type)
{
php_com_dotnet_object *obj;
VARIANT v;
VARTYPE vt = VT_EMPTY;
HRESULT res = S_OK;
- obj = CDNO_FETCH(readobj);
+ obj = (php_com_dotnet_object*) readobj;
ZVAL_NULL(writeobj);
VariantInit(&v);
@@ -528,12 +513,12 @@ static int com_object_cast(zval *readobj, zval *writeobj, int type)
return zend_std_cast_object_tostring(readobj, writeobj, type);
}
-static int com_object_count(zval *object, zend_long *count)
+static int com_object_count(zend_object *object, zend_long *count)
{
php_com_dotnet_object *obj;
LONG ubound = 0, lbound = 0;
- obj = CDNO_FETCH(object);
+ obj = (php_com_dotnet_object*) object;
if (!V_ISARRAY(&obj->v)) {
return FAILURE;
@@ -557,23 +542,22 @@ zend_object_handlers php_com_object_handlers = {
com_read_dimension,
com_write_dimension,
com_get_property_ptr_ptr,
- NULL, /* com_object_get, */
- NULL, /* com_object_set, */
com_property_exists,
com_property_delete,
com_dimension_exists,
com_dimension_delete,
com_properties_get,
com_method_get,
- com_call_method,
com_constructor_get,
com_class_name_get,
- com_objects_compare,
com_object_cast,
com_object_count,
NULL, /* get_debug_info */
NULL, /* get_closure */
zend_std_get_gc, /* get_gc */
+ NULL, /* do_operation */
+ com_objects_compare, /* compare */
+ NULL, /* get_properties_for */
};
void php_com_object_enable_event_sink(php_com_dotnet_object *obj, int enable)
@@ -629,11 +613,11 @@ void php_com_object_free_storage(zend_object *object)
zend_object_std_dtor(object);
}
-zend_object* php_com_object_clone(zval *object)
+zend_object* php_com_object_clone(zend_object *object)
{
php_com_dotnet_object *cloneobj, *origobject;
- origobject = (php_com_dotnet_object*)Z_OBJ_P(object);
+ origobject = (php_com_dotnet_object*) object;
cloneobj = (php_com_dotnet_object*)emalloc(sizeof(php_com_dotnet_object));
memcpy(cloneobj, origobject, sizeof(*cloneobj));
diff --git a/ext/com_dotnet/com_iterator.c b/ext/com_dotnet/com_iterator.c
index e6f5b84cbd..4300fd2cdc 100644
--- a/ext/com_dotnet/com_iterator.c
+++ b/ext/com_dotnet/com_iterator.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
diff --git a/ext/com_dotnet/com_misc.c b/ext/com_dotnet/com_misc.c
index 13a94033e6..24230761c1 100644
--- a/ext/com_dotnet/com_misc.c
+++ b/ext/com_dotnet/com_misc.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
diff --git a/ext/com_dotnet/com_olechar.c b/ext/com_dotnet/com_olechar.c
index 6c5b6430bd..665773b120 100644
--- a/ext/com_dotnet/com_olechar.c
+++ b/ext/com_dotnet/com_olechar.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c
index 9be79995a3..dc320c966c 100644
--- a/ext/com_dotnet/com_persist.c
+++ b/ext/com_dotnet/com_persist.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -287,7 +285,6 @@ PHP_COM_DOTNET_API IStream *php_com_wrapper_export_stream(php_stream *stream)
}
#define CPH_ME(fname, arginfo) PHP_ME(com_persist, fname, arginfo, ZEND_ACC_PUBLIC)
-#define CPH_SME(fname, arginfo) PHP_ME(com_persist, fname, arginfo, ZEND_ACC_ALLOW_STATIC|ZEND_ACC_PUBLIC)
#define CPH_METHOD(fname) static PHP_METHOD(com_persist, fname)
#define CPH_FETCH() php_com_persist_helper *helper = (php_com_persist_helper*)Z_OBJ_P(getThis());
@@ -383,7 +380,6 @@ CPH_METHOD(SaveToFile)
if (helper->ipf) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "p!|b",
&filename, &filename_len, &remember)) {
- php_com_throw_exception(E_INVALIDARG, "Invalid arguments");
return;
}
@@ -447,7 +443,6 @@ CPH_METHOD(LoadFromFile)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "p|l",
&filename, &filename_len, &flags)) {
- php_com_throw_exception(E_INVALIDARG, "Invalid arguments");
return;
}
@@ -543,7 +538,6 @@ CPH_METHOD(LoadFromStream)
CPH_FETCH();
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zstm)) {
- php_com_throw_exception(E_INVALIDARG, "invalid arguments");
return;
}
@@ -605,7 +599,6 @@ CPH_METHOD(SaveToStream)
CPH_NO_OBJ();
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zstm)) {
- php_com_throw_exception(E_INVALIDARG, "invalid arguments");
return;
}
@@ -653,7 +646,6 @@ CPH_METHOD(__construct)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(), "|O!",
&zobj, php_com_variant_class_entry)) {
- php_com_throw_exception(E_INVALIDARG, "invalid arguments");
return;
}
@@ -710,9 +702,9 @@ static void helper_free_storage(zend_object *obj)
}
-static zend_object* helper_clone(zval *obj)
+static zend_object* helper_clone(zend_object *obj)
{
- php_com_persist_helper *clone, *object = (php_com_persist_helper*)Z_OBJ_P(obj);
+ php_com_persist_helper *clone, *object = (php_com_persist_helper*) obj;
clone = emalloc(sizeof(*object));
memcpy(clone, object, sizeof(*object));
diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c
index 5f43c9fe25..2b42315151 100644
--- a/ext/com_dotnet/com_saproxy.c
+++ b/ext/com_dotnet/com_saproxy.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -37,7 +35,6 @@
typedef struct {
zend_object std;
/* the object we a proxying for; we hold a refcount to it */
- zval *zobj;
php_com_dotnet_object *obj;
/* how many dimensions we are indirecting to get into this element */
@@ -69,7 +66,7 @@ static inline void clone_indices(php_com_saproxy *dest, php_com_saproxy *src, in
}
}
-static zval *saproxy_property_read(zval *object, zval *member, int type, void **cache_slot, zval *rv)
+static zval *saproxy_property_read(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv)
{
ZVAL_NULL(rv);
@@ -78,15 +75,15 @@ static zval *saproxy_property_read(zval *object, zval *member, int type, void **
return rv;
}
-static zval *saproxy_property_write(zval *object, zval *member, zval *value, void **cache_slot)
+static zval *saproxy_property_write(zend_object *object, zend_string *member, zval *value, void **cache_slot)
{
php_com_throw_exception(E_INVALIDARG, "safearray has no properties");
return value;
}
-static zval *saproxy_read_dimension(zval *object, zval *offset, int type, zval *rv)
+static zval *saproxy_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
- php_com_saproxy *proxy = SA_FETCH(object);
+ php_com_saproxy *proxy = (php_com_saproxy*) object;
UINT dims, i;
SAFEARRAY *sa;
LONG ubound, lbound;
@@ -202,9 +199,9 @@ static zval *saproxy_read_dimension(zval *object, zval *offset, int type, zval *
return rv;
}
-static void saproxy_write_dimension(zval *object, zval *offset, zval *value)
+static void saproxy_write_dimension(zend_object *object, zval *offset, zval *value)
{
- php_com_saproxy *proxy = SA_FETCH(object);
+ php_com_saproxy *proxy = (php_com_saproxy*) object;
UINT dims, i;
HRESULT res;
VARIANT v;
@@ -275,41 +272,29 @@ static void saproxy_write_dimension(zval *object, zval *offset, zval *value)
}
}
-#if 0
-static void saproxy_object_set(zval **property, zval *value)
-{
-}
-
-static zval *saproxy_object_get(zval *property)
-{
- /* Not yet implemented in the engine */
- return NULL;
-}
-#endif
-
-static int saproxy_property_exists(zval *object, zval *member, int check_empty, void **cache_slot)
+static int saproxy_property_exists(zend_object *object, zend_string *member, int check_empty, void **cache_slot)
{
/* no properties */
return 0;
}
-static int saproxy_dimension_exists(zval *object, zval *member, int check_empty)
+static int saproxy_dimension_exists(zend_object *object, zval *member, int check_empty)
{
php_error_docref(NULL, E_WARNING, "Operation not yet supported on a COM object");
return 0;
}
-static void saproxy_property_delete(zval *object, zval *member, void **cache_slot)
+static void saproxy_property_delete(zend_object *object, zend_string *member, void **cache_slot)
{
php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object");
}
-static void saproxy_dimension_delete(zval *object, zval *offset)
+static void saproxy_dimension_delete(zend_object *object, zval *offset)
{
php_error_docref(NULL, E_WARNING, "Cannot delete properties from a COM object");
}
-static HashTable *saproxy_properties_get(zval *object)
+static HashTable *saproxy_properties_get(zend_object *object)
{
/* no properties */
return NULL;
@@ -321,11 +306,6 @@ static zend_function *saproxy_method_get(zend_object **object, zend_string *name
return NULL;
}
-static int saproxy_call_method(zend_string *method, zend_object *object, INTERNAL_FUNCTION_PARAMETERS)
-{
- return FAILURE;
-}
-
static zend_function *saproxy_constructor_get(zend_object *object)
{
/* user cannot instantiate */
@@ -339,17 +319,18 @@ static zend_string* saproxy_class_name_get(const zend_object *object)
static int saproxy_objects_compare(zval *object1, zval *object2)
{
+ ZEND_COMPARE_OBJECTS_FALLBACK(object1, object2);
return -1;
}
-static int saproxy_object_cast(zval *readobj, zval *writeobj, int type)
+static int saproxy_object_cast(zend_object *readobj, zval *writeobj, int type)
{
return FAILURE;
}
-static int saproxy_count_elements(zval *object, zend_long *count)
+static int saproxy_count_elements(zend_object *object, zend_long *count)
{
- php_com_saproxy *proxy = SA_FETCH(object);
+ php_com_saproxy *proxy = (php_com_saproxy*) object;
LONG ubound, lbound;
if (!V_ISARRAY(&proxy->obj->v)) {
@@ -375,21 +356,22 @@ static void saproxy_free_storage(zend_object *object)
//??? }
//??? }
+ OBJ_RELEASE(&proxy->obj->zo);
+
zend_object_std_dtor(object);
- zval_ptr_dtor(proxy->zobj);
efree(proxy->indices);
}
-static zend_object* saproxy_clone(zval *object)
+static zend_object* saproxy_clone(zend_object *object)
{
- php_com_saproxy *proxy = (php_com_saproxy *)Z_OBJ_P(object);
+ php_com_saproxy *proxy = (php_com_saproxy *) object;
php_com_saproxy *cloneproxy;
cloneproxy = emalloc(sizeof(*cloneproxy));
memcpy(cloneproxy, proxy, sizeof(*cloneproxy));
- Z_ADDREF_P(cloneproxy->zobj);
+ GC_ADDREF(&cloneproxy->obj->zo);
cloneproxy->indices = safe_emalloc(cloneproxy->dimensions, sizeof(zval *), 0);
clone_indices(cloneproxy, proxy, proxy->dimensions);
@@ -406,40 +388,40 @@ zend_object_handlers php_com_saproxy_handlers = {
saproxy_read_dimension,
saproxy_write_dimension,
NULL,
- NULL, /* saproxy_object_get, */
- NULL, /* saproxy_object_set, */
saproxy_property_exists,
saproxy_property_delete,
saproxy_dimension_exists,
saproxy_dimension_delete,
saproxy_properties_get,
saproxy_method_get,
- saproxy_call_method,
saproxy_constructor_get,
saproxy_class_name_get,
- saproxy_objects_compare,
saproxy_object_cast,
- saproxy_count_elements
+ saproxy_count_elements,
+ NULL, /* get_debug_info */
+ NULL, /* get_closure */
+ NULL, /* get_gc */
+ NULL, /* do_operation */
+ saproxy_objects_compare, /* compare */
+ NULL, /* get_properties_for */
};
-int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index)
+int php_com_saproxy_create(zend_object *com_object, zval *proxy_out, zval *index)
{
php_com_saproxy *proxy, *rel = NULL;
proxy = ecalloc(1, sizeof(*proxy));
proxy->dimensions = 1;
- if (Z_OBJCE_P(com_object) == php_com_saproxy_class_entry) {
- rel = SA_FETCH(com_object);
+ if (com_object->ce == php_com_saproxy_class_entry) {
+ rel = (php_com_saproxy*) com_object;
proxy->obj = rel->obj;
- proxy->zobj = rel->zobj;
proxy->dimensions += rel->dimensions;
} else {
- proxy->obj = CDNO_FETCH(com_object);
- proxy->zobj = com_object;
+ proxy->obj = (php_com_dotnet_object*) com_object;
}
- Z_ADDREF_P(proxy->zobj);
+ GC_ADDREF(&proxy->obj->zo);
proxy->indices = safe_emalloc(proxy->dimensions, sizeof(zval *), 0);
if (rel) {
diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c
index 44d0340af5..fe1d18f5d6 100644
--- a/ext/com_dotnet/com_typeinfo.c
+++ b/ext/com_dotnet/com_typeinfo.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c
index aef7fabe7f..e74739135a 100644
--- a/ext/com_dotnet/com_variant.c
+++ b/ext/com_dotnet/com_variant.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -452,7 +450,6 @@ PHP_FUNCTION(com_variant_create_instance)
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS(),
"z!|ll", &zvalue, &vt, &codepage)) {
- php_com_throw_exception(E_INVALIDARG, "Invalid arguments");
return;
}
diff --git a/ext/com_dotnet/com_wrapper.c b/ext/com_dotnet/com_wrapper.c
index 78d8912a90..5318011e44 100644
--- a/ext/com_dotnet/com_wrapper.c
+++ b/ext/com_dotnet/com_wrapper.c
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
diff --git a/ext/com_dotnet/php_com_dotnet.h b/ext/com_dotnet/php_com_dotnet.h
index 50894158f5..e770fd3a94 100644
--- a/ext/com_dotnet/php_com_dotnet.h
+++ b/ext/com_dotnet/php_com_dotnet.h
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h
index 676d2f9330..3ee7ec4eba 100644
--- a/ext/com_dotnet/php_com_dotnet_internal.h
+++ b/ext/com_dotnet/php_com_dotnet_internal.h
@@ -1,7 +1,5 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 7 |
- +----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
@@ -72,14 +70,14 @@ zend_class_entry *php_com_variant_class_entry, *php_com_exception_class_entry, *
/* com_handlers.c */
zend_object* php_com_object_new(zend_class_entry *ce);
-zend_object* php_com_object_clone(zval *object);
+zend_object* php_com_object_clone(zend_object *object);
void php_com_object_free_storage(zend_object *object);
zend_object_handlers php_com_object_handlers;
void php_com_object_enable_event_sink(php_com_dotnet_object *obj, int enable);
/* com_saproxy.c */
zend_object_iterator *php_com_saproxy_iter_get(zend_class_entry *ce, zval *object, int by_ref);
-int php_com_saproxy_create(zval *com_object, zval *proxy_out, zval *index);
+int php_com_saproxy_create(zend_object *com_object, zval *proxy_out, zval *index);
/* com_olechar.c */
PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring,