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
November 2019
----- 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
1 participants
895 discussions
Start a n
N
ew thread
Nikolay Sivov : ole32: Return optional name in IEnumSTATPROPSTG::Next().
by Alexandre Julliard
12 Nov '19
12 Nov '19
Module: wine Branch: master Commit: 9b7923e4bc59a1cf703f06d62f0c62638be08062 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b7923e4bc59a1cf703f06d6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Nov 12 12:00:11 2019 +0300 ole32: Return optional name in IEnumSTATPROPSTG::Next(). Based on patch by Michael Müller. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ole32/stg_prop.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 70b8cd3b0e..5518429b31 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -177,6 +177,7 @@ struct enum_stat_prop_stg { IEnumSTATPROPSTG IEnumSTATPROPSTG_iface; LONG refcount; + PropertyStorage_impl *storage; STATPROPSTG *stats; size_t current; size_t count; @@ -222,6 +223,7 @@ static ULONG WINAPI enum_stat_prop_stg_Release(IEnumSTATPROPSTG *iface) if (!refcount) { + IPropertyStorage_Release(&penum->storage->IPropertyStorage_iface); heap_free(penum->stats); heap_free(penum); } @@ -233,6 +235,7 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel { struct enum_stat_prop_stg *penum = impl_from_IEnumSTATPROPSTG(iface); ULONG count = 0; + WCHAR *name; TRACE("%p, %u, %p, %p.\n", iface, celt, ret, fetched); @@ -240,7 +243,19 @@ static HRESULT WINAPI enum_stat_prop_stg_Next(IEnumSTATPROPSTG *iface, ULONG cel penum->current = 0; while (count < celt && penum->current < penum->count) - ret[count++] = penum->stats[penum->current++]; + { + *ret = penum->stats[penum->current++]; + + if (dictionary_find(penum->storage->propid_to_name, UlongToPtr(ret->propid), (void **)&name)) + { + SIZE_T size = (lstrlenW(name) + 1) * sizeof(WCHAR); + ret->lpwstrName = CoTaskMemAlloc(size); + if (ret->lpwstrName) + memcpy(ret->lpwstrName, name, size); + } + ret++; + count++; + } if (fetched) *fetched = count; @@ -321,6 +336,8 @@ static HRESULT create_enum_stat_prop_stg(PropertyStorage_impl *storage, IEnumSTA enum_obj->IEnumSTATPROPSTG_iface.lpVtbl = &enum_stat_prop_stg_vtbl; enum_obj->refcount = 1; + enum_obj->storage = storage; + IPropertyStorage_AddRef(&storage->IPropertyStorage_iface); count = 0; dictionary_enumerate(storage->propid_to_prop, prop_enum_stat_count, &count);
1
0
0
0
Erich E. Hoover : qmgr: Call the notification callback when jobs complete.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 34ed1e37da1e1c1cfd641f1f16b0e00030cbb357 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=34ed1e37da1e1c1cfd641f1f…
Author: Erich E. Hoover <erich.e.hoover(a)gmail.com> Date: Thu Nov 7 11:26:26 2019 -0700 qmgr: Call the notification callback when jobs complete. Signed-off-by: Erich E. Hoover <erich.e.hoover(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qmgr/job.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/qmgr/job.c b/dlls/qmgr/job.c index 0eef3361d4..c33389574e 100644 --- a/dlls/qmgr/job.c +++ b/dlls/qmgr/job.c @@ -1280,6 +1280,8 @@ void processJob(BackgroundCopyJobImpl *job) if (done) { transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_TRANSFERRED); + if (job->callback && (job->notify_flags & BG_NOTIFY_JOB_TRANSFERRED)) + IBackgroundCopyCallback2_JobTransferred(job->callback, (IBackgroundCopyJob*)&job->IBackgroundCopyJob3_iface); return; }
1
0
0
0
Jacek Caban : msvcrt/tests: Add iswdigit tests.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 1edda7a30251c4a7bad020ad734d50dc04bbf93c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1edda7a30251c4a7bad020ad…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Nov 11 20:04:32 2019 +0100 msvcrt/tests: Add iswdigit tests. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/tests/string.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index a74ba22cfc..88922fe465 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -3930,6 +3930,28 @@ static void test_strstr(void) } } +static void test_iswdigit(void) +{ + static const struct { + WCHAR c; + int r; + } tests[] = { + { '0', C1_DIGIT }, + { '9', C1_DIGIT }, + { 'a', 0 }, + { 0xff16, C1_DIGIT }, + { 0x0660, C1_DIGIT }, + { 0x0ce6, C1_DIGIT } + }; + int i, r; + + for (i = 0; i < ARRAY_SIZE(tests); i++) + { + r = iswdigit(tests[i].c); + ok(r == tests[i].r, "iswdigit returned %x for %x\n", r, tests[i].c); + } +} + START_TEST(string) { char mem[100]; @@ -4070,4 +4092,5 @@ START_TEST(string) test___strncnt(); test_C_locale(); test_strstr(); + test_iswdigit(); }
1
0
0
0
Gabriel Ivăncescu : vbscript/tests: Add tests for pending and executed code persistence.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: e10935126123309430938f4a7aeac23125c48e43 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e10935126123309430938f4a…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:28 2019 +0200 vbscript/tests: Add tests for pending and executed code persistence. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/tests/vbscript.c | 237 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e1093512612330943093…
1
0
0
0
Gabriel Ivăncescu : vbscript/tests: Use integers instead of booleans for counting call expectations.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 2d45f49fe8ef71fa15f356244a641a6423464f3a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d45f49fe8ef71fa15f35624…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:27 2019 +0200 vbscript/tests: Use integers instead of booleans for counting call expectations. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/tests/vbscript.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/vbscript/tests/vbscript.c b/dlls/vbscript/tests/vbscript.c index c0a582c361..3fe73a910d 100644 --- a/dlls/vbscript/tests/vbscript.c +++ b/dlls/vbscript/tests/vbscript.c @@ -53,27 +53,27 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); #define DEFINE_EXPECT(func) \ - static BOOL expect_ ## func = FALSE, called_ ## func = FALSE + static int expect_ ## func = 0, called_ ## func = 0 #define SET_EXPECT(func) \ - expect_ ## func = TRUE + expect_ ## func = 1 #define CHECK_EXPECT2(func) \ do { \ ok(expect_ ##func, "unexpected call " #func "\n"); \ - called_ ## func = TRUE; \ + called_ ## func++; \ }while(0) #define CHECK_EXPECT(func) \ do { \ CHECK_EXPECT2(func); \ - expect_ ## func = FALSE; \ + expect_ ## func--; \ }while(0) #define CHECK_CALLED(func) \ do { \ ok(called_ ## func, "expected " #func "\n"); \ - expect_ ## func = called_ ## func = FALSE; \ + expect_ ## func = called_ ## func = 0; \ }while(0) DEFINE_EXPECT(GetLCID);
1
0
0
0
Gabriel Ivăncescu : vbscript: Change release_dynamic_vars to release a single variable.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: f9613711aaf29c3a43f008189085ba261ac30807 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f9613711aaf29c3a43f00818…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:25 2019 +0200 vbscript: Change release_dynamic_vars to release a single variable. We need to free them while iterating an array as well as a linked list. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/interp.c | 16 ++++++++-------- dlls/vbscript/vbscript.c | 2 +- dlls/vbscript/vbscript.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index cf21601ecc..d15a1b5329 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -2243,22 +2243,22 @@ OP_LIST #undef X }; -void release_dynamic_vars(dynamic_var_t *var) +void release_dynamic_var(dynamic_var_t *var) { - while(var) { - VariantClear(&var->v); - if(var->array) - SafeArrayDestroy(var->array); - var = var->next; - } + VariantClear(&var->v); + if(var->array) + SafeArrayDestroy(var->array); } static void release_exec(exec_ctx_t *ctx) { + dynamic_var_t *var; unsigned i; VariantClear(&ctx->ret_val); - release_dynamic_vars(ctx->dynamic_vars); + + for(var = ctx->dynamic_vars; var; var = var->next) + release_dynamic_var(var); if(ctx->vbthis) IDispatchEx_Release(&ctx->vbthis->IDispatchEx_iface); diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index 85107e7e84..fdade9f13a 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -217,7 +217,7 @@ static void release_script(script_ctx_t *ctx) clear_ei(&ctx->ei); for(i = 0; i < ctx->global_vars_cnt; i++) - VariantClear(&ctx->global_vars[i]->v); + release_dynamic_var(ctx->global_vars[i]); heap_free(ctx->global_vars); heap_free(ctx->global_funcs); diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index a59f341b10..1cc36fd3fd 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -361,7 +361,7 @@ void release_vbscode(vbscode_t*) DECLSPEC_HIDDEN; HRESULT compile_script(script_ctx_t*,const WCHAR*,const WCHAR*,DWORD,vbscode_t**) DECLSPEC_HIDDEN; HRESULT compile_procedure(script_ctx_t*,const WCHAR*,const WCHAR*,DWORD,class_desc_t**) DECLSPEC_HIDDEN; HRESULT exec_script(script_ctx_t*,BOOL,function_t*,vbdisp_t*,DISPPARAMS*,VARIANT*) DECLSPEC_HIDDEN; -void release_dynamic_vars(dynamic_var_t*) DECLSPEC_HIDDEN; +void release_dynamic_var(dynamic_var_t*) DECLSPEC_HIDDEN; IDispatch *lookup_named_item(script_ctx_t*,const WCHAR*,unsigned) DECLSPEC_HIDDEN; void clear_ei(EXCEPINFO*) DECLSPEC_HIDDEN; HRESULT report_script_error(script_ctx_t*) DECLSPEC_HIDDEN;
1
0
0
0
Gabriel Ivăncescu : vbscript: Append to the global lists when the code is executed, rather than compiled.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: b7eb693e7fefa9ff3a7bacb349a945818c5ad352 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b7eb693e7fefa9ff3a7bacb3…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:24 2019 +0200 vbscript: Append to the global lists when the code is executed, rather than compiled. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/compile.c | 102 ++++++++++++----------------------------------- dlls/vbscript/vbscript.c | 79 ++++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 76 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 50c9dfb873..bc0020913a 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -1759,6 +1759,7 @@ static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl) static BOOL lookup_script_identifier(script_ctx_t *script, const WCHAR *identifier) { class_desc_t *class; + vbscode_t *code; unsigned i; for(i = 0; i < script->global_vars_cnt; i++) { @@ -1776,6 +1777,30 @@ static BOOL lookup_script_identifier(script_ctx_t *script, const WCHAR *identifi return TRUE; } + LIST_FOR_EACH_ENTRY(code, &script->code_list, vbscode_t, entry) { + unsigned var_cnt = code->main_code.var_cnt; + var_desc_t *vars = code->main_code.vars; + function_t *func; + + if(!code->pending_exec) + continue; + + for(i = 0; i < var_cnt; i++) { + if(!wcsicmp(vars[i].name, identifier)) + return TRUE; + } + + for(func = code->funcs; func; func = func->next) { + if(!wcsicmp(func->name, identifier)) + return TRUE; + } + + for(class = code->classes; class; class = class->next) { + if(!wcsicmp(class->name, identifier)) + return TRUE; + } + } + return FALSE; } @@ -1864,13 +1889,11 @@ static void release_compiler(compile_ctx_t *ctx) HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *delimiter, DWORD flags, vbscode_t **ret) { - function_t *new_func, *func_iter; function_decl_t *func_decl; class_decl_t *class_decl; + function_t *new_func; compile_ctx_t ctx; vbscode_t *code; - size_t cnt; - unsigned i; HRESULT hres; if (!src) src = L""; @@ -1922,79 +1945,6 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli return compile_error(script, hres); } - cnt = script->global_vars_cnt + ctx.code->main_code.var_cnt; - if(cnt > script->global_vars_size) { - dynamic_var_t **new_vars; - if(script->global_vars) - new_vars = heap_realloc(script->global_vars, cnt * sizeof(*new_vars)); - else - new_vars = heap_alloc(cnt * sizeof(*new_vars)); - if(!new_vars) - return compile_error(script, E_OUTOFMEMORY); - script->global_vars = new_vars; - script->global_vars_size = cnt; - } - - cnt = script->global_funcs_cnt; - for(func_iter = ctx.code->funcs; func_iter; func_iter = func_iter->next) - cnt++; - if(cnt > script->global_funcs_size) { - function_t **new_funcs; - if(script->global_funcs) - new_funcs = heap_realloc(script->global_funcs, cnt * sizeof(*new_funcs)); - else - new_funcs = heap_alloc(cnt * sizeof(*new_funcs)); - if(!new_funcs) - return compile_error(script, E_OUTOFMEMORY); - script->global_funcs = new_funcs; - script->global_funcs_size = cnt; - } - - for(i = 0; i < ctx.code->main_code.var_cnt; i++) { - dynamic_var_t *var = compiler_alloc(ctx.code, sizeof(*var)); - if(!var) { - release_compiler(&ctx); - return compile_error(script, E_OUTOFMEMORY); - } - - var->name = ctx.code->main_code.vars[i].name; - V_VT(&var->v) = VT_EMPTY; - var->is_const = FALSE; - var->array = NULL; - - script->global_vars[script->global_vars_cnt + i] = var; - } - - script->global_vars_cnt += ctx.code->main_code.var_cnt; - - for(func_iter = ctx.code->funcs; func_iter; func_iter = func_iter->next) { - unsigned i; - for(i = 0; i < script->global_funcs_cnt; i++) { - if(!wcsicmp(script->global_funcs[i]->name, func_iter->name)) { - /* global function already exists, replace it */ - script->global_funcs[i] = func_iter; - break; - } - } - if(i == script->global_funcs_cnt) - script->global_funcs[script->global_funcs_cnt++] = func_iter; - } - - if(ctx.code->classes) { - class_desc_t *class = ctx.code->classes; - - while(1) { - class->ctx = script; - if(!class->next) - break; - class = class->next; - } - - class->next = script->classes; - script->classes = ctx.code->classes; - code->last_class = class; - } - code->is_persistent = (flags & SCRIPTTEXT_ISPERSISTENT) != 0; if(TRACE_ON(vbscript_disas)) diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c index 07763fa3d7..85107e7e84 100644 --- a/dlls/vbscript/vbscript.c +++ b/dlls/vbscript/vbscript.c @@ -82,6 +82,85 @@ static inline BOOL is_started(VBScript *This) static HRESULT exec_global_code(script_ctx_t *ctx, vbscode_t *code, VARIANT *res) { + function_t *func_iter, **new_funcs; + dynamic_var_t *var, **new_vars; + size_t cnt, i; + + cnt = ctx->global_vars_cnt + code->main_code.var_cnt; + if (cnt > ctx->global_vars_size) + { + if (ctx->global_vars) + new_vars = heap_realloc(ctx->global_vars, cnt * sizeof(*new_vars)); + else + new_vars = heap_alloc(cnt * sizeof(*new_vars)); + if (!new_vars) + return E_OUTOFMEMORY; + ctx->global_vars = new_vars; + ctx->global_vars_size = cnt; + } + + cnt = ctx->global_funcs_cnt; + for (func_iter = code->funcs; func_iter; func_iter = func_iter->next) + cnt++; + if (cnt > ctx->global_funcs_size) + { + if (ctx->global_funcs) + new_funcs = heap_realloc(ctx->global_funcs, cnt * sizeof(*new_funcs)); + else + new_funcs = heap_alloc(cnt * sizeof(*new_funcs)); + if (!new_funcs) + return E_OUTOFMEMORY; + ctx->global_funcs = new_funcs; + ctx->global_funcs_size = cnt; + } + + for (i = 0; i < code->main_code.var_cnt; i++) + { + if (!(var = heap_pool_alloc(&ctx->heap, sizeof(*var)))) + return E_OUTOFMEMORY; + + var->name = code->main_code.vars[i].name; + V_VT(&var->v) = VT_EMPTY; + var->is_const = FALSE; + var->array = NULL; + + ctx->global_vars[ctx->global_vars_cnt + i] = var; + } + + ctx->global_vars_cnt += code->main_code.var_cnt; + + for (func_iter = code->funcs; func_iter; func_iter = func_iter->next) + { + for (i = 0; i < ctx->global_funcs_cnt; i++) + { + if (!wcsicmp(ctx->global_funcs[i]->name, func_iter->name)) + { + /* global function already exists, replace it */ + ctx->global_funcs[i] = func_iter; + break; + } + } + if (i == ctx->global_funcs_cnt) + ctx->global_funcs[ctx->global_funcs_cnt++] = func_iter; + } + + if (code->classes) + { + class_desc_t *class = code->classes; + + while (1) + { + class->ctx = ctx; + if (!class->next) + break; + class = class->next; + } + + class->next = ctx->classes; + ctx->classes = code->classes; + code->last_class = class; + } + code->pending_exec = FALSE; return exec_script(ctx, TRUE, &code->main_code, NULL, NULL, res); }
1
0
0
0
Gabriel Ivăncescu : vbscript: Store the compiled functions list head into vbscode_t.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 9933c776c7cc03bd8a99976b72fb8171588e577a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9933c776c7cc03bd8a99976b…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:23 2019 +0200 vbscript: Store the compiled functions list head into vbscode_t. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/compile.c | 12 +++++------- dlls/vbscript/vbscript.h | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 3eb383348a..50c9dfb873 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -61,7 +61,6 @@ typedef struct { const_decl_t *global_consts; function_t *func; - function_t *funcs; function_decl_t *func_decls; } compile_ctx_t; @@ -1517,7 +1516,7 @@ static BOOL lookup_funcs_name(compile_ctx_t *ctx, const WCHAR *name) { function_t *iter; - for(iter = ctx->funcs; iter; iter = iter->next) { + for(iter = ctx->code->funcs; iter; iter = iter->next) { if(!wcsicmp(iter->name, name)) return TRUE; } @@ -1884,7 +1883,6 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli if(!ctx.code) return compile_error(script, E_OUTOFMEMORY); - ctx.funcs = NULL; ctx.func_decls = NULL; ctx.labels = NULL; ctx.global_consts = NULL; @@ -1906,8 +1904,8 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli return compile_error(script, hres); } - new_func->next = ctx.funcs; - ctx.funcs = new_func; + new_func->next = ctx.code->funcs; + ctx.code->funcs = new_func; } for(class_decl = ctx.parser.class_decls; class_decl; class_decl = class_decl->next) { @@ -1938,7 +1936,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli } cnt = script->global_funcs_cnt; - for(func_iter = ctx.funcs; func_iter; func_iter = func_iter->next) + for(func_iter = ctx.code->funcs; func_iter; func_iter = func_iter->next) cnt++; if(cnt > script->global_funcs_size) { function_t **new_funcs; @@ -1969,7 +1967,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli script->global_vars_cnt += ctx.code->main_code.var_cnt; - for(func_iter = ctx.funcs; func_iter; func_iter = func_iter->next) { + for(func_iter = ctx.code->funcs; func_iter; func_iter = func_iter->next) { unsigned i; for(i = 0; i < script->global_funcs_cnt; i++) { if(!wcsicmp(script->global_funcs[i]->name, func_iter->name)) { diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 29d790be6c..a59f341b10 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -350,6 +350,7 @@ struct _vbscode_t { unsigned bstr_cnt; heap_pool_t heap; + function_t *funcs; class_desc_t *classes; class_desc_t *last_class;
1
0
0
0
Gabriel Ivăncescu : vbscript: Store the compiled classes list head into vbscode_t.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 8b30b86765bcfaffd151d52d4ef1bc09a3022057 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8b30b86765bcfaffd151d52d…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Mon Nov 11 14:34:22 2019 +0200 vbscript: Store the compiled classes list head into vbscode_t. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/compile.c | 17 +++++++---------- dlls/vbscript/vbscript.h | 1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index de45961ad6..3eb383348a 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -63,8 +63,6 @@ typedef struct { function_t *func; function_t *funcs; function_decl_t *func_decls; - - class_desc_t *classes; } compile_ctx_t; static HRESULT compile_expression(compile_ctx_t*,expression_t*); @@ -1586,7 +1584,7 @@ static BOOL lookup_class_name(compile_ctx_t *ctx, const WCHAR *name) { class_desc_t *iter; - for(iter = ctx->classes; iter; iter = iter->next) { + for(iter = ctx->code->classes; iter; iter = iter->next) { if(!wcsicmp(iter->name, name)) return TRUE; } @@ -1754,8 +1752,8 @@ static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl) } } - class_desc->next = ctx->classes; - ctx->classes = class_desc; + class_desc->next = ctx->code->classes; + ctx->code->classes = class_desc; return S_OK; } @@ -1795,7 +1793,7 @@ static HRESULT check_script_collisions(compile_ctx_t *ctx, script_ctx_t *script) } } - for(class = ctx->classes; class; class = class->next) { + for(class = ctx->code->classes; class; class = class->next) { if(lookup_script_identifier(script, class->name)) { FIXME("%s: redefined\n", debugstr_w(class->name)); return E_FAIL; @@ -1888,7 +1886,6 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli ctx.funcs = NULL; ctx.func_decls = NULL; - ctx.classes = NULL; ctx.labels = NULL; ctx.global_consts = NULL; ctx.stat_ctx = NULL; @@ -1985,8 +1982,8 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli script->global_funcs[script->global_funcs_cnt++] = func_iter; } - if(ctx.classes) { - class_desc_t *class = ctx.classes; + if(ctx.code->classes) { + class_desc_t *class = ctx.code->classes; while(1) { class->ctx = script; @@ -1996,7 +1993,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *deli } class->next = script->classes; - script->classes = ctx.classes; + script->classes = ctx.code->classes; code->last_class = class; } diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index ef5cee23bf..29d790be6c 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -350,6 +350,7 @@ struct _vbscode_t { unsigned bstr_cnt; heap_pool_t heap; + class_desc_t *classes; class_desc_t *last_class; struct list entry;
1
0
0
0
Alexandre Julliard : kernel32: Move exec process functionality to ntdll.
by Alexandre Julliard
11 Nov '19
11 Nov '19
Module: wine Branch: master Commit: 83e520f5567feda2024abf9cb007c0cd89189c01 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=83e520f5567feda2024abf9c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 11 21:04:27 2019 +0100 kernel32: Move exec process functionality to ntdll. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 248 +----------------------------------------------- dlls/ntdll/loader.c | 39 ++++++-- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/process.c | 179 ++++++++++++++++++++++++++++++++++ 4 files changed, 210 insertions(+), 257 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=83e520f5567feda2024a…
1
0
0
0
← Newer
1
...
61
62
63
64
65
66
67
...
90
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
Results per page:
10
25
50
100
200