winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2009
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1207 discussions
Start a n
N
ew thread
Andrew Eikum : mshtml: Add test suite for IHTMLLocation.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: ab857c84931c960738078261addf79f95587aa36 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab857c84931c960738078261a…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Oct 14 16:33:03 2009 -0500 mshtml: Add test suite for IHTMLLocation. --- dlls/mshtml/tests/Makefile.in | 1 + dlls/mshtml/tests/htmllocation.c | 431 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 432 insertions(+), 0 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ab857c84931c960738078…
1
0
0
0
Eric Pouech : winmm: Transform the mmio proc kind into a boolean ( to distinguish between ANSI and Unicode).
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 99c4b22bab34a36f81cc20750cb42010b7e8e23f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99c4b22bab34a36f81cc20750…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Wed Oct 14 21:56:13 2009 +0200 winmm: Transform the mmio proc kind into a boolean (to distinguish between ANSI and Unicode). --- dlls/winmm/mmio.c | 101 ++++++++++++++++++++++----------------------------- dlls/winmm/winemm.h | 4 +-- 2 files changed, 44 insertions(+), 61 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=99c4b22bab34a36f81cc2…
1
0
0
0
Eric Pouech : winmm: Create real 16<>32 thunks for mmio support in MMSystem .
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: e5b4559d2ea80d198a6f755de574756923264b47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e5b4559d2ea80d198a6f755de…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Wed Oct 14 21:56:05 2009 +0200 winmm: Create real 16<>32 thunks for mmio support in MMSystem. --- dlls/winmm/mmio.c | 22 +--- dlls/winmm/mmio16.c | 271 +++++++++++++++++++++++++++++++++++++++++------- dlls/winmm/mmsystem.c | 3 - dlls/winmm/winemm.h | 12 +-- 4 files changed, 238 insertions(+), 70 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e5b4559d2ea80d198a6f7…
1
0
0
0
Eric Pouech : mmsystem: Move the 16bit mmio code into a dedicated file ( mmio16.c).
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: f4c561746c577912181ebaef83105709c6e61147 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4c561746c577912181ebaef8…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Wed Oct 14 21:55:57 2009 +0200 mmsystem: Move the 16bit mmio code into a dedicated file (mmio16.c). --- dlls/winmm/Makefile.in | 1 + dlls/winmm/mmio16.c | 449 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/winmm/mmsystem.c | 411 +------------------------------------------- 3 files changed, 451 insertions(+), 410 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f4c561746c577912181eb…
1
0
0
0
Jacek Caban : msxml3: Store xmlnode structure instead of pointer in node implementations.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 04eff32bbb526fa35642f1b2bae3fc75b52d289f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04eff32bbb526fa35642f1b2b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Oct 14 20:01:42 2009 +0200 msxml3: Store xmlnode structure instead of pointer in node implementations. --- dlls/msxml3/attribute.c | 91 +++++++++++++++++------------------- dlls/msxml3/cdata.c | 99 +++++++++++++++++++--------------------- dlls/msxml3/comment.c | 103 ++++++++++++++++++++---------------------- dlls/msxml3/docfrag.c | 85 ++++++++++++++++------------------ dlls/msxml3/domdoc.c | 107 ++++++++++++++++++++---------------------- dlls/msxml3/element.c | 92 +++++++++++++++++-------------------- dlls/msxml3/entityref.c | 85 ++++++++++++++++------------------ dlls/msxml3/msxml_private.h | 2 +- dlls/msxml3/node.c | 39 +++++++-------- dlls/msxml3/pi.c | 91 +++++++++++++++++------------------- dlls/msxml3/text.c | 99 +++++++++++++++++++--------------------- 11 files changed, 421 insertions(+), 472 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=04eff32bbb526fa35642f…
1
0
0
0
Markus Stockhausen : dinput8: Ensure balance of CoInitialize/CoUninitialize .
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 70ae1ba4b552be732a5f627f62ec3521c4234988 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70ae1ba4b552be732a5f627f6…
Author: Markus Stockhausen <markus.stockhausen(a)collogia.de> Date: Wed Oct 14 19:47:45 2009 +0200 dinput8: Ensure balance of CoInitialize/CoUninitialize. --- dlls/dinput8/dinput8_main.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/dinput8/dinput8_main.c b/dlls/dinput8/dinput8_main.c index 77f7f64..87dd07b 100644 --- a/dlls/dinput8/dinput8_main.c +++ b/dlls/dinput8/dinput8_main.c @@ -51,7 +51,7 @@ static void UnlockModule(void) * DirectInput8Create (DINPUT8.@) */ HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riid, LPVOID *ppDI, LPUNKNOWN punkOuter) { - HRESULT hr; + HRESULT hr, hrCo; TRACE("hInst (%p), dwVersion: %d, riid (%s), punkOuter (%p))\n", hinst, dwVersion, debugstr_guid(riid), punkOuter); @@ -62,7 +62,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst, DWORD dwVer if( !(IsEqualGUID(&IID_IDirectInput8A, riid) || IsEqualGUID(&IID_IDirectInput8W, riid) || IsEqualGUID(&IID_IUnknown, riid)) ) return DIERR_INVALIDPARAM; - CoInitialize(NULL); + hrCo = CoInitialize(NULL); hr = CoCreateInstance( &CLSID_DirectInput8, punkOuter, CLSCTX_INPROC_SERVER, riid, ppDI); if(FAILED(hr)) { @@ -70,7 +70,9 @@ HRESULT WINAPI DECLSPEC_HOTPATCH DirectInput8Create(HINSTANCE hinst, DWORD dwVer return DIERR_INVALIDPARAM; } - CoUninitialize(); + /* ensure balance of calls */ + if(hrCo == S_OK || hrCo == S_FALSE) + CoUninitialize(); /* When aggregation is used (punkOuter!=NULL) the application needs to manually call Initialize. */ if(punkOuter == NULL && IsEqualGUID(&IID_IDirectInput8A, riid)) {
1
0
0
0
Vincent Povirk : urlmon: Add CoInternetGetSecurityUrl stub.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 8643bae3642934dd7a91647b44c852cf9d150e6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8643bae3642934dd7a91647b4…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Oct 14 11:06:14 2009 -0500 urlmon: Add CoInternetGetSecurityUrl stub. --- dlls/urlmon/sec_mgr.c | 9 +++++++++ dlls/urlmon/urlmon.spec | 2 +- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index 7a1255a..968a987 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -1228,3 +1228,12 @@ HRESULT WINAPI CoInternetCreateZoneManager(IServiceProvider* pSP, IInternetZoneM TRACE("(%p %p %x)\n", pSP, ppZM, dwReserved); return ZoneMgrImpl_Construct(NULL, (void**)ppZM); } + +/******************************************************************** + * CoInternetGetSecurityUrl (URLMON.@) + */ +HRESULT WINAPI CoInternetGetSecurityUrl(LPCWSTR pwzUrl, LPWSTR *ppwzSecUrl, PSUACTION psuAction, DWORD dwReserved) +{ + FIXME("(%p,%p,%u,%u): stub\n", pwzUrl, ppwzSecUrl, psuAction, dwReserved); + return E_NOTIMPL; +} diff --git a/dlls/urlmon/urlmon.spec b/dlls/urlmon/urlmon.spec index 2ed9988..cc40c36 100644 --- a/dlls/urlmon/urlmon.spec +++ b/dlls/urlmon/urlmon.spec @@ -15,7 +15,7 @@ @ stdcall CoInternetCreateSecurityManager(ptr ptr long) @ stdcall CoInternetCreateZoneManager(ptr ptr long) @ stub CoInternetGetProtocolFlags -@ stub CoInternetGetSecurityUrl +@ stdcall CoInternetGetSecurityUrl(ptr ptr long long) @ stdcall CoInternetGetSession(long ptr long) @ stdcall CoInternetParseUrl(wstr long long wstr long ptr long) @ stdcall CoInternetQueryInfo(ptr long long ptr long ptr long)
1
0
0
0
James Helferty : d3d9/tests: Fix position of EndScene in visual test.
by Alexandre Julliard
15 Oct '09
15 Oct '09
Module: wine Branch: master Commit: 2b5ff0916098a7ac89c8a7053440d13d0052370f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2b5ff0916098a7ac89c8a7053…
Author: James Helferty <jlh(a)transgaming.com> Date: Wed Oct 14 10:57:36 2009 -0400 d3d9/tests: Fix position of EndScene in visual test. --- dlls/d3d9/tests/visual.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index f12983d..c087f8b 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -9112,11 +9112,10 @@ static void tssargtemp_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_BeginScene(device); ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene failed, hr = %08x\n", hr); if(SUCCEEDED(hr)) { - - hr = IDirect3DDevice9_EndScene(device); - ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr = %08x\n", hr); hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0])); ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitiveUP failed with %08x\n", hr); + hr = IDirect3DDevice9_EndScene(device); + ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed, hr = %08x\n", hr); } IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); color = getPixelColor(device, 320, 240);
1
0
0
0
Jacek Caban : jscript: Create regexp object when evaluating regexp literal.
by Alexandre Julliard
14 Oct '09
14 Oct '09
Module: wine Branch: master Commit: e52115d67329c60187c273de22fc47d38e4850bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e52115d67329c60187c273de2…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Oct 14 14:43:01 2009 +0200 jscript: Create regexp object when evaluating regexp literal. --- dlls/jscript/engine.c | 29 +++++++++++++++++++++-------- dlls/jscript/engine.h | 15 +++++++-------- dlls/jscript/lex.c | 22 ++++------------------ dlls/jscript/parser.y | 5 ----- dlls/jscript/tests/lang.js | 5 +++++ 5 files changed, 37 insertions(+), 39 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index fa14fd9..0cb7851 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -347,7 +347,7 @@ static HRESULT equal2_values(VARIANT *lval, VARIANT *rval, BOOL *ret) return S_OK; } -static HRESULT literal_to_var(literal_t *literal, VARIANT *v) +static HRESULT literal_to_var(script_ctx_t *ctx, literal_t *literal, VARIANT *v) { switch(literal->type) { case LT_UNDEFINED: @@ -364,18 +364,31 @@ static HRESULT literal_to_var(literal_t *literal, VARIANT *v) V_VT(v) = VT_R8; V_R8(v) = literal->u.dval; break; - case LT_STRING: + case LT_STRING: { + BSTR str = SysAllocString(literal->u.wstr); + if(!str) + return E_OUTOFMEMORY; + V_VT(v) = VT_BSTR; - V_BSTR(v) = SysAllocString(literal->u.wstr); + V_BSTR(v) = str; break; + } case LT_BOOL: V_VT(v) = VT_BOOL; V_BOOL(v) = literal->u.bval; break; - case LT_DISPATCH: + case LT_REGEXP: { + DispatchEx *regexp; + HRESULT hres; + + hres = create_regexp(ctx, literal->u.regexp.str, literal->u.regexp.str_len, + literal->u.regexp.flags, ®exp); + if(FAILED(hres)) + return hres; + V_VT(v) = VT_DISPATCH; - IDispatch_AddRef(literal->u.disp); - V_DISPATCH(v) = literal->u.disp; + V_DISPATCH(v) = (IDispatch*)_IDispatchEx_(regexp); + } } return S_OK; @@ -1656,7 +1669,7 @@ HRESULT literal_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flag TRACE("\n"); - hres = literal_to_var(expr->literal, &var); + hres = literal_to_var(ctx->parser->script, expr->literal, &var); if(FAILED(hres)) return hres; @@ -1735,7 +1748,7 @@ HRESULT property_value_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWO return hres; for(iter = expr->property_list; iter; iter = iter->next) { - hres = literal_to_var(iter->name, &tmp); + hres = literal_to_var(ctx->parser->script, iter->name, &tmp); if(FAILED(hres)) break; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index e1952a9..0cd4c40 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -19,11 +19,6 @@ typedef struct _source_elements_t source_elements_t; typedef struct _function_expression_t function_expression_t; -typedef struct _obj_literal_t { - DispatchEx *obj; - struct _obj_literal_t *next; -} obj_literal_t; - typedef struct _function_declaration_t { function_expression_t *expr; @@ -61,7 +56,6 @@ typedef struct _parser_ctx_t { jsheap_t heap; - obj_literal_t *obj_literals; func_stack_t *func_stack; struct _parser_ctx_t *next; @@ -131,9 +125,9 @@ typedef enum { LT_DOUBLE, LT_STRING, LT_BOOL, - LT_DISPATCH, LT_UNDEFINED, - LT_NULL + LT_NULL, + LT_REGEXP }literal_type_t; typedef struct { @@ -144,6 +138,11 @@ typedef struct { const WCHAR *wstr; VARIANT_BOOL bval; IDispatch *disp; + struct { + const WCHAR *str; + DWORD str_len; + DWORD flags; + } regexp; } u; } literal_t; diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index efb1782..4e04dea 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -755,20 +755,10 @@ int parser_lex(void *lval, parser_ctx_t *ctx) return 0; } -static void add_object_literal(parser_ctx_t *ctx, DispatchEx *obj) -{ - obj_literal_t *literal = parser_alloc(ctx, sizeof(obj_literal_t)); - - literal->obj = obj; - literal->next = ctx->obj_literals; - ctx->obj_literals = literal; -} - literal_t *parse_regexp(parser_ctx_t *ctx) { const WCHAR *re, *flags_ptr; DWORD re_len, flags; - DispatchEx *regexp; literal_t *ret; HRESULT hres; @@ -798,14 +788,10 @@ literal_t *parse_regexp(parser_ctx_t *ctx) if(FAILED(hres)) return NULL; - hres = create_regexp(ctx->script, re, re_len, flags, ®exp); - if(FAILED(hres)) - return NULL; - - add_object_literal(ctx, regexp); - ret = parser_alloc(ctx, sizeof(literal_t)); - ret->type = LT_DISPATCH; - ret->u.disp = (IDispatch*)_IDispatchEx_(regexp); + ret->type = LT_REGEXP; + ret->u.regexp.str = re; + ret->u.regexp.str_len = re_len; + ret->u.regexp.flags = flags; return ret; } diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index ee3d100..9cae524 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -1591,14 +1591,9 @@ static void program_parsed(parser_ctx_t *ctx, source_elements_t *source) void parser_release(parser_ctx_t *ctx) { - obj_literal_t *iter; - if(--ctx->ref) return; - for(iter = ctx->obj_literals; iter; iter = iter->next) - jsdisp_release(iter->obj); - jsheap_free(&ctx->heap); heap_free(ctx); } diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index 353dcd7..db08b21 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -934,6 +934,11 @@ ok((function (){return 1;})() === 1, "(function (){return 1;})() = " + (function var re = /=(\?|%3F)/g; ok(re.source === "=(\\?|%3F)", "re.source = " + re.source); +tmp = new Array(); +for(var i=0; i<2; i++) + tmp[i] = /b/; +ok(tmp[0] != tmp[1], "tmp[0] == tmp [1]"); + ok(createNullBSTR() === '', "createNullBSTR() !== ''"); ok(getVT(nullDisp) === "VT_DISPATCH", "getVT(nullDisp) = " + getVT(nullDisp));
1
0
0
0
Jacek Caban : jscript: Separate flags parsing from regexp creating.
by Alexandre Julliard
14 Oct '09
14 Oct '09
Module: wine Branch: master Commit: 98b5a1c6e81601435838d676d91abc7a7b5c74f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98b5a1c6e81601435838d676d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Oct 14 14:42:30 2009 +0200 jscript: Separate flags parsing from regexp creating. --- dlls/jscript/jscript.h | 3 +- dlls/jscript/lex.c | 12 +++++++--- dlls/jscript/regexp.c | 51 +++++++++++++++++++++++++---------------------- dlls/jscript/string.c | 2 +- 4 files changed, 38 insertions(+), 30 deletions(-) diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index cde1e1b..af1c1c3 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -225,7 +225,7 @@ HRESULT throw_uri_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*); HRESULT create_object(script_ctx_t*,DispatchEx*,DispatchEx**); HRESULT create_math(script_ctx_t*,DispatchEx**); HRESULT create_array(script_ctx_t*,DWORD,DispatchEx**); -HRESULT create_regexp_str(script_ctx_t*,const WCHAR*,DWORD,const WCHAR*,DWORD,DispatchEx**); +HRESULT create_regexp(script_ctx_t*,const WCHAR *,int,DWORD,DispatchEx**); HRESULT create_string(script_ctx_t*,const WCHAR*,DWORD,DispatchEx**); HRESULT create_bool(script_ctx_t*,VARIANT_BOOL,DispatchEx**); HRESULT create_number(script_ctx_t*,VARIANT*,DispatchEx**); @@ -319,6 +319,7 @@ typedef struct { HRESULT regexp_match_next(script_ctx_t*,DispatchEx*,BOOL,const WCHAR*,DWORD,const WCHAR**,match_result_t**, DWORD*,DWORD*,match_result_t*); HRESULT regexp_match(script_ctx_t*,DispatchEx*,const WCHAR*,DWORD,BOOL,match_result_t**,DWORD*); +HRESULT parse_regexp_flags(const WCHAR*,DWORD,DWORD*); static inline VARIANT *get_arg(DISPPARAMS *dp, DWORD i) { diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index cd53bd9..efb1782 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -766,10 +766,10 @@ static void add_object_literal(parser_ctx_t *ctx, DispatchEx *obj) literal_t *parse_regexp(parser_ctx_t *ctx) { - const WCHAR *re, *flags; + const WCHAR *re, *flags_ptr; + DWORD re_len, flags; DispatchEx *regexp; literal_t *ret; - DWORD re_len; HRESULT hres; TRACE("\n"); @@ -790,11 +790,15 @@ literal_t *parse_regexp(parser_ctx_t *ctx) re_len = ctx->ptr-re; - flags = ++ctx->ptr; + flags_ptr = ++ctx->ptr; while(ctx->ptr < ctx->end && isalnumW(*ctx->ptr)) ctx->ptr++; - hres = create_regexp_str(ctx->script, re, re_len, flags, ctx->ptr-flags, ®exp); + hres = parse_regexp_flags(flags_ptr, ctx->ptr-flags_ptr, &flags); + if(FAILED(hres)) + return NULL; + + hres = create_regexp(ctx->script, re, re_len, flags, ®exp); if(FAILED(hres)) return NULL; diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c index fa5672f..6c4af84 100644 --- a/dlls/jscript/regexp.c +++ b/dlls/jscript/regexp.c @@ -3737,7 +3737,7 @@ static HRESULT alloc_regexp(script_ctx_t *ctx, DispatchEx *object_prototype, Reg return S_OK; } -static HRESULT create_regexp(script_ctx_t *ctx, const WCHAR *exp, int len, DWORD flags, DispatchEx **ret) +HRESULT create_regexp(script_ctx_t *ctx, const WCHAR *exp, int len, DWORD flags, DispatchEx **ret) { RegExpInstance *regexp; HRESULT hres; @@ -3773,6 +3773,7 @@ static HRESULT regexp_constructor(script_ctx_t *ctx, DISPPARAMS *dp, VARIANT *re const WCHAR *opt = emptyW, *src; DispatchEx *ret; VARIANT *arg; + DWORD flags; HRESULT hres; if(!arg_cnt(dp)) { @@ -3820,7 +3821,11 @@ static HRESULT regexp_constructor(script_ctx_t *ctx, DISPPARAMS *dp, VARIANT *re opt = V_BSTR(arg); } - hres = create_regexp_str(ctx, src, -1, opt, strlenW(opt), &ret); + hres = parse_regexp_flags(opt, strlenW(opt), &flags); + if(FAILED(hres)) + return hres; + + hres = create_regexp(ctx, src, -1, flags, &ret); if(FAILED(hres)) return hres; @@ -3892,33 +3897,31 @@ HRESULT create_regexp_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di return hres; } -HRESULT create_regexp_str(script_ctx_t *ctx, const WCHAR *exp, DWORD exp_len, const WCHAR *opt, - DWORD opt_len, DispatchEx **ret) +HRESULT parse_regexp_flags(const WCHAR *str, DWORD str_len, DWORD *ret) { const WCHAR *p; DWORD flags = 0; - if(opt) { - for (p = opt; p < opt+opt_len; p++) { - switch (*p) { - case 'g': - flags |= JSREG_GLOB; - break; - case 'i': - flags |= JSREG_FOLD; - break; - case 'm': - flags |= JSREG_MULTILINE; - break; - case 'y': - flags |= JSREG_STICKY; - break; - default: - WARN("wrong flag %c\n", *p); - return E_FAIL; - } + for (p = str; p < str+str_len; p++) { + switch (*p) { + case 'g': + flags |= JSREG_GLOB; + break; + case 'i': + flags |= JSREG_FOLD; + break; + case 'm': + flags |= JSREG_MULTILINE; + break; + case 'y': + flags |= JSREG_STICKY; + break; + default: + WARN("wrong flag %c\n", *p); + return E_FAIL; } } - return create_regexp(ctx, exp, exp_len, flags, ret); + *ret = flags; + return S_OK; } diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index b78de0b..2e48d5b 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -656,7 +656,7 @@ static HRESULT String_match(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP if(FAILED(hres)) return hres; - hres = create_regexp_str(ctx, match_str, SysStringLen(match_str), NULL, 0, ®exp); + hres = create_regexp(ctx, match_str, SysStringLen(match_str), 0, ®exp); SysFreeString(match_str); if(FAILED(hres)) return hres;
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
121
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Results per page:
10
25
50
100
200