jscript: Get rid of no longer needed identifier in exprval_t.

This commit is contained in:
Jacek Caban 2011-12-20 11:47:02 +01:00 committed by Alexandre Julliard
parent f5a3f1417e
commit 00030ff66f
2 changed files with 5 additions and 7 deletions

View File

@ -220,7 +220,7 @@ static void exprval_release(exprval_t *val)
IDispatch_Release(val->u.idref.disp);
return;
case EXPRVAL_INVALID:
SysFreeString(val->u.identifier);
return;
}
}
@ -240,7 +240,7 @@ static HRESULT exprval_value(script_ctx_t *ctx, exprval_t *val, jsexcept_t *ei,
return disp_propget(ctx, val->u.idref.disp, val->u.idref.id, ret, ei, NULL/*FIXME*/);
case EXPRVAL_INVALID:
return throw_type_error(ctx, ei, JS_E_UNDEFINED_VARIABLE, val->u.identifier);
assert(0);
}
ERR("type %d\n", val->type);
@ -653,10 +653,6 @@ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, DWORD flags,
}
ret->type = EXPRVAL_INVALID;
ret->u.identifier = SysAllocString(identifier);
if(!ret->u.identifier)
return E_OUTOFMEMORY;
return S_OK;
}
@ -1585,6 +1581,9 @@ static HRESULT interp_ident(exec_ctx_t *ctx)
if(FAILED(hres))
return hres;
if(exprval.type == EXPRVAL_INVALID)
return throw_type_error(ctx->parser->script, ctx->ei, JS_E_UNDEFINED_VARIABLE, arg);
hres = exprval_to_value(ctx->parser->script, &exprval, ctx->ei, &v);
exprval_release(&exprval);
if(FAILED(hres))

View File

@ -423,7 +423,6 @@ typedef struct {
IDispatch *disp;
DISPID id;
} idref;
BSTR identifier;
} u;
} exprval_t;