1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00

fixed bug in com_load_typelib

This commit is contained in:
Harald Radi
2001-08-14 11:50:16 +00:00
parent 80277be8e3
commit 0fbbadbd2f
2 changed files with 10 additions and 6 deletions
+5 -3
View File
@@ -1084,13 +1084,13 @@ PHP_FUNCTION(com_load_typelib)
{
pval *arg_typelib, *arg_cis;
ITypeLib *pTL;
int mode;
int mode = CONST_CS; /* CONST_PERSISTENT|CONST_CS; */
switch (ZEND_NUM_ARGS()) {
case 1:
zend_get_parameters(ht, 1, &arg_typelib);
mode = CONST_CS; /* CONST_PERSISTENT|CONST_CS; */
break;
case 2:
zend_get_parameters(ht, 2, &arg_typelib, &arg_cis);
convert_to_boolean_ex(&arg_cis);
@@ -1098,6 +1098,7 @@ PHP_FUNCTION(com_load_typelib)
mode &= ~CONST_CS;
}
break;
default:
ZEND_WRONG_PARAM_COUNT();
}
@@ -1292,7 +1293,8 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
int type;
if (zend_llist_count(property_reference->elements_list)==1
&& !strcmp(Z_STRVAL(function_name->element), "com")) { /* constructor */
&& !strcmp(Z_STRVAL(function_name->element), "com")) {
/* constructor */
pval *object_handle;
PHP_FN(com_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+5 -3
View File
@@ -1084,13 +1084,13 @@ PHP_FUNCTION(com_load_typelib)
{
pval *arg_typelib, *arg_cis;
ITypeLib *pTL;
int mode;
int mode = CONST_CS; /* CONST_PERSISTENT|CONST_CS; */
switch (ZEND_NUM_ARGS()) {
case 1:
zend_get_parameters(ht, 1, &arg_typelib);
mode = CONST_CS; /* CONST_PERSISTENT|CONST_CS; */
break;
case 2:
zend_get_parameters(ht, 2, &arg_typelib, &arg_cis);
convert_to_boolean_ex(&arg_cis);
@@ -1098,6 +1098,7 @@ PHP_FUNCTION(com_load_typelib)
mode &= ~CONST_CS;
}
break;
default:
ZEND_WRONG_PARAM_COUNT();
}
@@ -1292,7 +1293,8 @@ PHPAPI void php_COM_call_function_handler(INTERNAL_FUNCTION_PARAMETERS, zend_pro
int type;
if (zend_llist_count(property_reference->elements_list)==1
&& !strcmp(Z_STRVAL(function_name->element), "com")) { /* constructor */
&& !strcmp(Z_STRVAL(function_name->element), "com")) {
/* constructor */
pval *object_handle;
PHP_FN(com_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU);