make next() return a single value instead of an array with one element

This commit is contained in:
Harald Radi 2001-08-14 00:28:54 +00:00
parent f7c0bc955c
commit d041982a9c
2 changed files with 18 additions and 0 deletions

View file

@ -741,6 +741,15 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
}
}
/* return a single element if next() was called without count */
if((arg_count == 0) && (count == 1))
{
long index[] = {1};
SafeArrayGetElement(pSA, index, var_result);
SafeArrayDestroy(pSA);
}
return SUCCESS;
}
else if(C_HASENUM(obj) && strstr(Z_STRVAL_P(function_name), "reset"))

View file

@ -741,6 +741,15 @@ int do_COM_invoke(comval *obj, pval *function_name, VARIANT *var_result, pval **
}
}
/* return a single element if next() was called without count */
if((arg_count == 0) && (count == 1))
{
long index[] = {1};
SafeArrayGetElement(pSA, index, var_result);
SafeArrayDestroy(pSA);
}
return SUCCESS;
}
else if(C_HASENUM(obj) && strstr(Z_STRVAL_P(function_name), "reset"))