Jacek Caban : jscript: Added RegExp.leftContext implementation.
Alexandre Julliard
julliard at winehq.org
Thu May 27 10:46:39 CDT 2010
Module: wine
Branch: master
Commit: 9159ddce92896a21eda20c2a55fe31d43de581d9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9159ddce92896a21eda20c2a55fe31d43de581d9
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed May 26 19:18:32 2010 +0200
jscript: Added RegExp.leftContext implementation.
---
dlls/jscript/regexp.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c
index c4c7225..19f5f19 100644
--- a/dlls/jscript/regexp.c
+++ b/dlls/jscript/regexp.c
@@ -3999,8 +3999,27 @@ HRESULT regexp_string_match(script_ctx_t *ctx, DispatchEx *re, BSTR str,
static HRESULT RegExpConstr_leftContext(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
- FIXME("\n");
- return E_NOTIMPL;
+ TRACE("\n");
+
+ switch(flags) {
+ case DISPATCH_PROPERTYGET: {
+ BSTR ret;
+
+ ret = SysAllocStringLen(ctx->last_match, ctx->last_match_index);
+ if(!ret)
+ return E_OUTOFMEMORY;
+
+ V_VT(retv) = VT_BSTR;
+ V_BSTR(retv) = ret;
+ }
+ case DISPATCH_PROPERTYPUT:
+ return S_OK;
+ default:
+ FIXME("unsupported flags\n");
+ return E_NOTIMPL;
+ }
+
+ return S_OK;
}
static HRESULT RegExpConstr_rightContext(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
More information about the wine-cvs
mailing list