[PATCH v2 2/2] vbscript: Handle recursive calls.

Robert Wilhelm robert.wilhelm at gmx.net
Thu Oct 7 15:42:34 CDT 2021


Hi Jacek,

your version avoids the extra parameter to do_icall.
This makes the patch smaller and less ugly.

Thanks for fast review and your helpful hints,

Robert

On Thu, 2021-10-07 at 21:55 +0200, Jacek Caban wrote:
> Hi Robert,
>
> On 10/6/21 10:11 PM, Robert Wilhelm wrote:
> > -static HRESULT do_icall(exec_ctx_t *ctx, VARIANT *res, BSTR identifier, unsigned arg_cnt)
> > +static HRESULT do_icall(exec_ctx_t *ctx, VARIANT *res, BSTR identifier, unsigned arg_cnt, BOOL ident)
> >   {
> >       DISPPARAMS dp;
> >       ref_t ref;
> >       HRESULT hres;
> >
> > -    TRACE("%s %u\n", debugstr_w(identifier), arg_cnt);
> > +    TRACE("%s %u %d\n", debugstr_w(identifier), arg_cnt, ident);
> >
> > -    hres = lookup_identifier(ctx, identifier, VBDISP_CALLGET, &ref);
> > -    if(FAILED(hres))
> > -        return hres;
> > +    if( ident && (ctx->func->type == FUNC_FUNCTION || ctx->func->type == FUNC_PROPGET)
> > +       && !wcsicmp(identifier, ctx->func->name)) {
> > +        ref.type = REF_VAR;
> > +        ref.u.v = &ctx->ret_val;
> > +    }
> > +    else {
> > +        hres = lookup_identifier(ctx, identifier, VBDISP_CALLGET, &ref);
> > +        if(FAILED(hres))
> > +            return hres;
> > +    }
>
>
> I think it would be easier to handle that in the caller. What do you
> think about the attached patch?
>
>
> Thanks,
>
> Jacek
>





More information about the wine-devel mailing list