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
September 2013
----- 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
2 participants
645 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Use clamp() instead of max() for calculating the clamped cosine in the ffp lighting calculations.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: ff6ce4c669ac901abdc9664d891b4b6d044df295 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ff6ce4c669ac901abdc9664d8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Sep 4 08:56:43 2013 +0200 wined3d: Use clamp() instead of max() for calculating the clamped cosine in the ffp lighting calculations. On typical hardware, the clamp() would be an instruction modifier, while the max() would need an extra instruction. --- dlls/wined3d/glsl_shader.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 740e100..280ec20 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -4940,7 +4940,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_shader_buffer *buffer if (!settings->normal) break; shader_addline(buffer, "dir = normalize(dir);\n"); - shader_addline(buffer, "diffuse += (max(0.0, dot(dir, normal))" + shader_addline(buffer, "diffuse += (clamp(dot(dir, normal), 0.0, 1.0)" " * gl_LightSource[%u].diffuse.xyz) / att;\n", i); if (settings->localviewer) shader_addline(buffer, "t = dot(normal, normalize(dir - normalize(ec_pos.xyz)));\n"); @@ -4965,7 +4965,7 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_shader_buffer *buffer shader_addline(buffer, "ambient += gl_LightSource[%u].ambient.xyz * att;\n", i); if (!settings->normal) break; - shader_addline(buffer, "diffuse += (max(0.0, dot(dir, normal))" + shader_addline(buffer, "diffuse += (clamp(dot(dir, normal), 0.0, 1.0)" " * gl_LightSource[%u].diffuse.xyz) * att;\n", i); if (settings->localviewer) shader_addline(buffer, "t = dot(normal, normalize(dir - normalize(ec_pos.xyz)));\n"); @@ -4980,7 +4980,8 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_shader_buffer *buffer if (!settings->normal) break; shader_addline(buffer, "dir = normalize(gl_LightSource[%u].position.xyz);\n", i); - shader_addline(buffer, "diffuse += max(0.0, dot(dir, normal)) * gl_LightSource[%u].diffuse.xyz;\n", i); + shader_addline(buffer, "diffuse += clamp(dot(dir, normal), 0.0, 1.0)" + " * gl_LightSource[%u].diffuse.xyz;\n", i); shader_addline(buffer, "t = dot(normal, gl_LightSource[%u].halfVector.xyz);\n", i); shader_addline(buffer, "if (t > 0.0) specular += pow(t, gl_FrontMaterial.shininess)" " * gl_LightSource[%u].specular;\n", i);
1
0
0
0
Nikolay Sivov : shell32: Fix remaining cases of implementation pointer being returned.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: 725b069e68d288009f1a3d9bcb7120adddfda96b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=725b069e68d288009f1a3d9bc…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Sep 4 10:12:30 2013 +0400 shell32: Fix remaining cases of implementation pointer being returned. --- dlls/shell32/shfldr_desktop.c | 2 +- dlls/shell32/shfldr_mycomp.c | 2 +- dlls/shell32/shfldr_netplaces.c | 2 +- dlls/shell32/shfldr_printers.c | 2 +- dlls/shell32/shlview.c | 14 ++++---------- dlls/shell32/shlview_cmenu.c | 2 +- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c index e2b73d0..c4072b7 100644 --- a/dlls/shell32/shfldr_desktop.c +++ b/dlls/shell32/shfldr_desktop.c @@ -112,7 +112,7 @@ static HRESULT WINAPI ISF_Desktop_fnQueryInterface( IsEqualIID (riid, &IID_IShellFolder) || IsEqualIID (riid, &IID_IShellFolder2)) { - *ppvObj = This; + *ppvObj = &This->IShellFolder2_iface; } else if (IsEqualIID (riid, &IID_IPersist) || IsEqualIID (riid, &IID_IPersistFolder) || diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index a21a2f3..686edb0 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -140,7 +140,7 @@ static HRESULT WINAPI ISF_MyComputer_fnQueryInterface (IShellFolder2 *iface, IsEqualIID (riid, &IID_IShellFolder) || IsEqualIID (riid, &IID_IShellFolder2)) { - *ppvObj = This; + *ppvObj = &This->IShellFolder2_iface; } else if (IsEqualIID (riid, &IID_IPersist) || IsEqualIID (riid, &IID_IPersistFolder) || diff --git a/dlls/shell32/shfldr_netplaces.c b/dlls/shell32/shfldr_netplaces.c index 1cff18d..36d18bc 100644 --- a/dlls/shell32/shfldr_netplaces.c +++ b/dlls/shell32/shfldr_netplaces.c @@ -133,7 +133,7 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnQueryInterface (IShellFolder2 *iface, IsEqualIID (riid, &IID_IShellFolder) || IsEqualIID (riid, &IID_IShellFolder2)) { - *ppvObj = This; + *ppvObj = &This->IShellFolder2_iface; } else if (IsEqualIID (riid, &IID_IPersist) || IsEqualIID (riid, &IID_IPersistFolder) || diff --git a/dlls/shell32/shfldr_printers.c b/dlls/shell32/shfldr_printers.c index e8d17d1..7ee6548 100644 --- a/dlls/shell32/shfldr_printers.c +++ b/dlls/shell32/shfldr_printers.c @@ -80,7 +80,7 @@ static HRESULT WINAPI IShellFolder_Printers_fnQueryInterface(IShellFolder2 *ifac IsEqualIID (riid, &IID_IShellFolder) || IsEqualIID (riid, &IID_IShellFolder2)) { - *ppvObj = This; + *ppvObj = &This->IShellFolder2_iface; } else if (IsEqualIID (riid, &IID_IPersist) || IsEqualIID (riid, &IID_IPersistFolder) || diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 2cdd160..29593f8 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -1751,17 +1751,11 @@ static HRESULT WINAPI IShellView_fnQueryInterface(IShellView2 *iface, REFIID rii *ppvObj = NULL; - if(IsEqualIID(riid, &IID_IUnknown)) + if(IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IShellView) || + IsEqualIID(riid, &IID_IShellView2)) { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellView)) - { - *ppvObj = This; - } - else if(IsEqualIID(riid, &IID_IShellView2)) - { - *ppvObj = This; + *ppvObj = &This->IShellView2_iface; } else if(IsEqualIID(riid, &IID_IShellFolderView)) { diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c index 4c4edef..fb4ef4e 100644 --- a/dlls/shell32/shlview_cmenu.c +++ b/dlls/shell32/shlview_cmenu.c @@ -78,7 +78,7 @@ static HRESULT WINAPI ContextMenu_QueryInterface(IContextMenu3 *iface, REFIID ri IsEqualIID(riid, &IID_IContextMenu2) || IsEqualIID(riid, &IID_IContextMenu3)) { - *ppvObj = This; + *ppvObj = &This->IContextMenu3_iface; } else if (IsEqualIID(riid, &IID_IShellExtInit)) /*IShellExtInit*/ {
1
0
0
0
Nikolay Sivov : ntdll: Added support for multiple progids in comClass and clrClass elements.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: af3a20d2ea493fa5c0d0516db5bb48309b218fc1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af3a20d2ea493fa5c0d0516db…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Sep 4 09:47:32 2013 +0400 ntdll: Added support for multiple progids in comClass and clrClass elements. --- dlls/kernel32/tests/actctx.c | 18 ++++++++- dlls/ntdll/actctx.c | 80 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 90 insertions(+), 8 deletions(-) diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c index 8d2f352..b689d30 100644 --- a/dlls/kernel32/tests/actctx.c +++ b/dlls/kernel32/tests/actctx.c @@ -113,7 +113,14 @@ static const char manifest3[] = " miscStatusContent=\"insideout\"" " miscStatusThumbnail=\"alignable\"" " miscStatusDocPrint=\"simpleframe,setclientsitefirst\"" -" />" +" >" +" <progid>ProgId.ProgId.1</progid>" +" <progid>ProgId.ProgId.2</progid>" +" <progid>ProgId.ProgId.3</progid>" +" <progid>ProgId.ProgId.4</progid>" +" <progid>ProgId.ProgId.5</progid>" +" <progid>ProgId.ProgId.6</progid>" +" </comClass>" " <comInterfaceProxyStub " " name=\"Iifaceps\"" " tlbid=\"{99999999-8888-7777-6666-555555555558}\"" @@ -152,7 +159,14 @@ static const char manifest3[] = " tlbid=\"{99999999-8888-7777-6666-555555555555}\"" " runtimeVersion=\"1.2.3.4\"" " threadingModel=\"Neutral\"" -" />" +" >" +" <progid>clrprogid.1</progid>" +" <progid>clrprogid.2</progid>" +" <progid>clrprogid.3</progid>" +" <progid>clrprogid.4</progid>" +" <progid>clrprogid.5</progid>" +" <progid>clrprogid.6</progid>" +" </clrClass>" "</assembly>"; static const char manifest_wndcls1[] = diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index f652c18..2ce7715 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -5,6 +5,7 @@ * Copyright 2007 Eric Pouech * Copyright 2007 Jacek Caban for CodeWeavers * Copyright 2007 Alexandre Julliard + * Copyright 2013 Nikolay Sivov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -368,6 +369,13 @@ struct clrsurrogate_data no modules part as it belongs to assembly level, not a file. */ +struct progids +{ + WCHAR **progids; + unsigned int num; + unsigned int allocated; +}; + struct entity { DWORD kind; @@ -394,6 +402,7 @@ struct entity DWORD miscstatusthumbnail; DWORD miscstatusicon; DWORD miscstatusdocprint; + struct progids progids; } comclass; struct { WCHAR *iid; @@ -777,7 +786,7 @@ static struct entity* add_entity(struct entity_array *array, DWORD kind) static void free_entity_array(struct entity_array *array) { - unsigned int i; + unsigned int i, j; for (i = 0; i < array->num; i++) { struct entity *entity = &array->base[i]; @@ -789,6 +798,9 @@ static void free_entity_array(struct entity_array *array) RtlFreeHeap(GetProcessHeap(), 0, entity->u.comclass.progid); RtlFreeHeap(GetProcessHeap(), 0, entity->u.comclass.name); RtlFreeHeap(GetProcessHeap(), 0, entity->u.comclass.version); + for (j = 0; j < entity->u.comclass.progids.num; j++) + RtlFreeHeap(GetProcessHeap(), 0, entity->u.comclass.progids.progids[j]); + RtlFreeHeap(GetProcessHeap(), 0, entity->u.comclass.progids.progids); break; case ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION: RtlFreeHeap(GetProcessHeap(), 0, entity->u.ifaceps.iid); @@ -1372,10 +1384,44 @@ static DWORD parse_com_class_misc(const xmlstr_t *value) return flags; } +static BOOL com_class_add_progid(const xmlstr_t *progid, struct entity *entity) +{ + struct progids *progids = &entity->u.comclass.progids; + + if (progids->allocated == 0) + { + progids->allocated = 4; + if (!(progids->progids = RtlAllocateHeap(GetProcessHeap(), 0, progids->allocated * sizeof(WCHAR*)))) return FALSE; + } + + if (progids->allocated == progids->num) + { + progids->allocated *= 2; + progids->progids = RtlReAllocateHeap(GetProcessHeap(), 0, progids->progids, progids->allocated * sizeof(WCHAR*)); + } + + if (!(progids->progids[progids->num] = xmlstrdupW(progid))) return FALSE; + progids->num++; + + return TRUE; +} + +static BOOL parse_com_class_progid(xmlbuf_t* xmlbuf, struct entity *entity) +{ + xmlstr_t content; + BOOL end = FALSE; + + if (!parse_expect_no_attr(xmlbuf, &end) || end || !parse_text_content(xmlbuf, &content)) + return FALSE; + + if (!com_class_add_progid(&content, entity)) return FALSE; + return parse_expect_end_elem(xmlbuf, progidW, asmv1W); +} + static BOOL parse_com_class_elem(xmlbuf_t* xmlbuf, struct dll_redirect* dll, struct actctx_loader *acl) { xmlstr_t elem, attr_name, attr_value; - BOOL ret, end = FALSE, error; + BOOL ret = TRUE, end = FALSE, error; struct entity* entity; if (!(entity = add_entity(&dll->entities, ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION))) @@ -1431,13 +1477,17 @@ static BOOL parse_com_class_elem(xmlbuf_t* xmlbuf, struct dll_redirect* dll, str if (end) return TRUE; - while ((ret = next_xml_elem(xmlbuf, &elem))) + while (ret && (ret = next_xml_elem(xmlbuf, &elem))) { if (xmlstr_cmp_end(&elem, comClassW)) { ret = parse_end_element(xmlbuf); break; } + else if (xmlstr_cmp(&elem, progidW)) + { + ret = parse_com_class_progid(xmlbuf, entity); + } else { WARN("unknown elem %s\n", debugstr_xmlstr(&elem)); @@ -1797,8 +1847,8 @@ static BOOL parse_com_interface_external_proxy_stub_elem(xmlbuf_t* xmlbuf, static BOOL parse_clr_class_elem(xmlbuf_t* xmlbuf, struct assembly* assembly) { - xmlstr_t attr_name, attr_value; - BOOL end = FALSE, error; + xmlstr_t attr_name, attr_value, elem; + BOOL end = FALSE, error, ret = TRUE; struct entity* entity; entity = add_entity(&assembly->entities, ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION); @@ -1837,7 +1887,25 @@ static BOOL parse_clr_class_elem(xmlbuf_t* xmlbuf, struct assembly* assembly) } if (error || end) return end; - return parse_expect_end_elem(xmlbuf, clrClassW, asmv1W); + + while (ret && (ret = next_xml_elem(xmlbuf, &elem))) + { + if (xmlstr_cmp_end(&elem, clrClassW)) + { + ret = parse_end_element(xmlbuf); + break; + } + else if (xmlstr_cmp(&elem, progidW)) + { + ret = parse_com_class_progid(xmlbuf, entity); + } + else + { + WARN("unknown elem %s\n", debugstr_xmlstr(&elem)); + ret = parse_unknown_elem(xmlbuf, &elem); + } + } + return ret; } static BOOL parse_clr_surrogate_elem(xmlbuf_t* xmlbuf, struct assembly* assembly, struct actctx_loader *acl)
1
0
0
0
Bruno Jesus : ws2_32: Merge protocol.c and socket.c.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: 03362e5a3dcc3a7dff8c5ba45c299a16ed3e3a70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=03362e5a3dcc3a7dff8c5ba45…
Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Tue Sep 3 22:51:58 2013 -0300 ws2_32: Merge protocol.c and socket.c. --- dlls/ws2_32/Makefile.in | 1 - dlls/ws2_32/protocol.c | 324 ----------------------------------------------- dlls/ws2_32/socket.c | 274 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 274 insertions(+), 325 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=03362e5a3dcc3a7dff8c5…
1
0
0
0
Dmitry Timoshkov : server: Print the debug trace to stderr.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: e22f8d2fd86421c61c03de8e675054c9ca3922da URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e22f8d2fd86421c61c03de8e6…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Wed Sep 4 11:47:03 2013 +0900 server: Print the debug trace to stderr. --- server/sock.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/sock.c b/server/sock.c index d6a228e..145e2a7 100644 --- a/server/sock.c +++ b/server/sock.c @@ -466,7 +466,7 @@ static void sock_dump( struct object *obj, int verbose ) { struct sock *sock = (struct sock *)obj; assert( obj->ops == &sock_ops ); - printf( "Socket fd=%p, state=%x, mask=%x, pending=%x, held=%x\n", + fprintf( stderr, "Socket fd=%p, state=%x, mask=%x, pending=%x, held=%x\n", sock->fd, sock->state, sock->mask, sock->pmask, sock->hmask ); }
1
0
0
0
Michael Stefaniuc : dplayx: Simplify the creation of a IDPLobbySPImpl COM object.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: 30c55f35472b8ea828da884a235794ae27b09df6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=30c55f35472b8ea828da884a2…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Sep 3 23:24:58 2013 +0200 dplayx: Simplify the creation of a IDPLobbySPImpl COM object. --- dlls/dplayx/dplay.c | 3 +- dlls/dplayx/dplay_global.h | 2 +- dlls/dplayx/lobbysp.c | 56 +++++++++++++++++-------------------------- 3 files changed, 24 insertions(+), 37 deletions(-) diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 4529c5e..94ba844 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -187,8 +187,7 @@ static BOOL DP_CreateDirectPlay2( LPVOID lpDP ) sizeof( *This->dp2->dplspData.lpCB ) ); This->dp2->dplspData.lpCB->dwSize = sizeof( *This->dp2->dplspData.lpCB ); - if( FAILED( DPLSP_CreateInterface( &IID_IDPLobbySP, - (LPVOID*)&This->dp2->dplspData.lpISP, This ) ) + if( FAILED( dplobbysp_create( &IID_IDPLobbySP, (void**)&This->dp2->dplspData.lpISP, This ) ) ) { /* FIXME: Memory leak */ diff --git a/dlls/dplayx/dplay_global.h b/dlls/dplayx/dplay_global.h index 7fde277..dca6396 100644 --- a/dlls/dplayx/dplay_global.h +++ b/dlls/dplayx/dplay_global.h @@ -209,6 +209,6 @@ extern LPVOID DPSP_CreateSPPlayerData(void) DECLSPEC_HIDDEN; extern HRESULT dplay_create( REFIID riid, void **ppv ) DECLSPEC_HIDDEN; extern HRESULT dplobby_create( REFIID riid, void **ppv ) DECLSPEC_HIDDEN; extern HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) DECLSPEC_HIDDEN; -extern HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) DECLSPEC_HIDDEN; +extern HRESULT dplobbysp_create( REFIID riid, void **ppv, IDirectPlayImpl *dp ) DECLSPEC_HIDDEN; #endif /* __WINE_DPLAY_GLOBAL_INCLUDED */ diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c index 8b0c24c..72198da 100644 --- a/dlls/dplayx/lobbysp.c +++ b/dlls/dplayx/lobbysp.c @@ -38,40 +38,6 @@ static inline IDPLobbySPImpl *impl_from_IDPLobbySP(IDPLobbySP *iface) return CONTAINING_RECORD(iface, IDPLobbySPImpl, IDPLobbySP_iface); } -/* Forward declaration of virtual tables */ -static const IDPLobbySPVtbl dpLobbySPVT; - -HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) -{ - TRACE( " for %s\n", debugstr_guid( riid ) ); - - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( IDPLobbySPImpl ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - if( IsEqualGUID( &IID_IDPLobbySP, riid ) ) - { - IDPLobbySPImpl *This = *ppvObj; - This->IDPLobbySP_iface.lpVtbl = &dpLobbySPVT; - This->dplay = dp; - } - else - { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; - } - - IDPLobbySP_AddRef( (LPDPLOBBYSP)*ppvObj ); - return S_OK; -} - static HRESULT WINAPI IDPLobbySPImpl_QueryInterface( IDPLobbySP *iface, REFIID riid, void **ppv ) { @@ -260,3 +226,25 @@ static const IDPLobbySPVtbl dpLobbySPVT = IDPLobbySPImpl_SetSPDataPointer, IDPLobbySPImpl_StartSession }; + +HRESULT dplobbysp_create( REFIID riid, void **ppv, IDirectPlayImpl *dp ) +{ + IDPLobbySPImpl *obj; + HRESULT hr; + + TRACE( "(%s, %p)\n", debugstr_guid( riid ), ppv ); + + *ppv = NULL; + obj = HeapAlloc( GetProcessHeap(), 0, sizeof( *obj ) ); + if ( !obj ) + return DPERR_OUTOFMEMORY; + + obj->IDPLobbySP_iface.lpVtbl = &dpLobbySPVT; + obj->ref = 0; + obj->dplay = dp; + + hr = IDPLobbySP_QueryInterface( &obj->IDPLobbySP_iface, riid, ppv ); + IDPLobbySP_Release( &obj->IDPLobbySP_iface ); + + return hr; +}
1
0
0
0
Michael Stefaniuc : dplayx: Finish the COM cleanup for IDPLobbySP.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: 56e1e6aa7f546ac7010589d31a7ecbc786a0df45 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56e1e6aa7f546ac7010589d31…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Sep 3 23:23:19 2013 +0200 dplayx: Finish the COM cleanup for IDPLobbySP. --- dlls/dplayx/lobbysp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c index 6e7fdd6..8b0c24c 100644 --- a/dlls/dplayx/lobbysp.c +++ b/dlls/dplayx/lobbysp.c @@ -28,14 +28,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); typedef struct IDPLobbySPImpl { - const IDPLobbySPVtbl *lpVtbl; + IDPLobbySP IDPLobbySP_iface; LONG ref; IDirectPlayImpl *dplay; } IDPLobbySPImpl; static inline IDPLobbySPImpl *impl_from_IDPLobbySP(IDPLobbySP *iface) { - return CONTAINING_RECORD( iface, IDPLobbySPImpl, lpVtbl ); + return CONTAINING_RECORD(iface, IDPLobbySPImpl, IDPLobbySP_iface); } /* Forward declaration of virtual tables */ @@ -56,7 +56,7 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) if( IsEqualGUID( &IID_IDPLobbySP, riid ) ) { IDPLobbySPImpl *This = *ppvObj; - This->lpVtbl = &dpLobbySPVT; + This->IDPLobbySP_iface.lpVtbl = &dpLobbySPVT; This->dplay = dp; } else
1
0
0
0
Michael Stefaniuc : dplayx: Merge the extra struct into IDPLobbySPImpl.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: 02ce71edeea3a14dd0449b0f49b1741d939b1061 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02ce71edeea3a14dd0449b0f4…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Sep 3 23:22:44 2013 +0200 dplayx: Merge the extra struct into IDPLobbySPImpl. --- dlls/dplayx/lobbysp.c | 67 ++++-------------------------------------------- 1 files changed, 6 insertions(+), 61 deletions(-) diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c index 506976d..6e7fdd6 100644 --- a/dlls/dplayx/lobbysp.c +++ b/dlls/dplayx/lobbysp.c @@ -26,28 +26,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); -/* Prototypes */ -static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ); -static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ); - - -/* Predefine the interface */ -typedef struct IDPLobbySPImpl IDPLobbySPImpl; - -typedef struct tagDPLobbySPData -{ - IDirectPlayImpl *dplay; -} DPLobbySPData; - -#define DPLSP_IMPL_FIELDS \ - DPLobbySPData* sp; - -struct IDPLobbySPImpl +typedef struct IDPLobbySPImpl { const IDPLobbySPVtbl *lpVtbl; LONG ref; - DPLSP_IMPL_FIELDS -}; + IDirectPlayImpl *dplay; +} IDPLobbySPImpl; static inline IDPLobbySPImpl *impl_from_IDPLobbySP(IDPLobbySP *iface) { @@ -73,6 +57,7 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) { IDPLobbySPImpl *This = *ppvObj; This->lpVtbl = &dpLobbySPVT; + This->dplay = dp; } else { @@ -83,45 +68,8 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) return E_NOINTERFACE; } - /* Initialize it */ - if( DPLSP_CreateDPLobbySP( *ppvObj, dp ) ) - { - IDPLobbySP_AddRef( (LPDPLOBBYSP)*ppvObj ); - return S_OK; - } - - /* Initialize failed, destroy it */ - DPLSP_DestroyDPLobbySP( *ppvObj ); - - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return DPERR_NOMEMORY; -} - -static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ) -{ - IDPLobbySPImpl *This = lpSP; - - This->sp = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->sp) ) ); - - if ( This->sp == NULL ) - { - return FALSE; - } - - This->sp->dplay = dp; - - return TRUE; -} - -static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ) -{ - IDPLobbySPImpl *This = lpSP; - - HeapFree( GetProcessHeap(), 0, This->sp ); - - return TRUE; + IDPLobbySP_AddRef( (LPDPLOBBYSP)*ppvObj ); + return S_OK; } static HRESULT WINAPI IDPLobbySPImpl_QueryInterface( IDPLobbySP *iface, REFIID riid, @@ -159,10 +107,7 @@ static ULONG WINAPI IDPLobbySPImpl_Release( IDPLobbySP *iface ) TRACE( "(%p) ref=%d\n", This, ref ); if( !ref ) - { - DPLSP_DestroyDPLobbySP( This ); HeapFree( GetProcessHeap(), 0, This ); - } return ref; }
1
0
0
0
Michael Stefaniuc : dplayx: Remove the unused lock from IDPLobbySPImpl.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: a966f9740f02521108418aa5794e23c5f6ad592f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a966f9740f02521108418aa57…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Sep 3 23:21:32 2013 +0200 dplayx: Remove the unused lock from IDPLobbySPImpl. --- dlls/dplayx/lobbysp.c | 42 +----------------------------------------- 1 files changed, 1 insertions(+), 41 deletions(-) diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c index 4dd7eb2..506976d 100644 --- a/dlls/dplayx/lobbysp.c +++ b/dlls/dplayx/lobbysp.c @@ -27,8 +27,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); /* Prototypes */ -static BOOL DPLSP_CreateIUnknown( LPVOID lpSP ); -static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP ); static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ); static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ); @@ -36,18 +34,12 @@ static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ); /* Predefine the interface */ typedef struct IDPLobbySPImpl IDPLobbySPImpl; -typedef struct tagDPLobbySPIUnknownData -{ - CRITICAL_SECTION DPLSP_lock; -} DPLobbySPIUnknownData; - typedef struct tagDPLobbySPData { IDirectPlayImpl *dplay; } DPLobbySPData; #define DPLSP_IMPL_FIELDS \ - DPLobbySPIUnknownData* unk; \ DPLobbySPData* sp; struct IDPLobbySPImpl @@ -92,9 +84,7 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) } /* Initialize it */ - if( DPLSP_CreateIUnknown( *ppvObj ) && - DPLSP_CreateDPLobbySP( *ppvObj, dp ) - ) + if( DPLSP_CreateDPLobbySP( *ppvObj, dp ) ) { IDPLobbySP_AddRef( (LPDPLOBBYSP)*ppvObj ); return S_OK; @@ -102,7 +92,6 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) /* Initialize failed, destroy it */ DPLSP_DestroyDPLobbySP( *ppvObj ); - DPLSP_DestroyIUnknown( *ppvObj ); HeapFree( GetProcessHeap(), 0, *ppvObj ); *ppvObj = NULL; @@ -110,34 +99,6 @@ HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) return DPERR_NOMEMORY; } -static BOOL DPLSP_CreateIUnknown( LPVOID lpSP ) -{ - IDPLobbySPImpl *This = lpSP; - - This->unk = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->unk) ) ); - - if ( This->unk == NULL ) - { - return FALSE; - } - - InitializeCriticalSection( &This->unk->DPLSP_lock ); - This->unk->DPLSP_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDPLobbySPImpl*->DPLobbySPIUnknownData*->DPLSP_lock"); - - return TRUE; -} - -static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP ) -{ - IDPLobbySPImpl *This = lpSP; - - This->unk->DPLSP_lock.DebugInfo->Spare[0] = 0; - DeleteCriticalSection( &This->unk->DPLSP_lock ); - HeapFree( GetProcessHeap(), 0, This->unk ); - - return TRUE; -} - static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ) { IDPLobbySPImpl *This = lpSP; @@ -200,7 +161,6 @@ static ULONG WINAPI IDPLobbySPImpl_Release( IDPLobbySP *iface ) if( !ref ) { DPLSP_DestroyDPLobbySP( This ); - DPLSP_DestroyIUnknown( This ); HeapFree( GetProcessHeap(), 0, This ); }
1
0
0
0
Michael Stefaniuc : dplayx: Simplify ref-counting for IDPLobbySP.
by Alexandre Julliard
04 Sep '13
04 Sep '13
Module: wine Branch: master Commit: b11dddf7cafb75902cc705d9a82e92a2b2f28ac5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b11dddf7cafb75902cc705d9a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Sep 3 23:20:21 2013 +0200 dplayx: Simplify ref-counting for IDPLobbySP. --- dlls/dplayx/lobbysp.c | 71 +++++++++++++----------------------------------- 1 files changed, 19 insertions(+), 52 deletions(-) diff --git a/dlls/dplayx/lobbysp.c b/dlls/dplayx/lobbysp.c index 33101fd..4dd7eb2 100644 --- a/dlls/dplayx/lobbysp.c +++ b/dlls/dplayx/lobbysp.c @@ -38,7 +38,6 @@ typedef struct IDPLobbySPImpl IDPLobbySPImpl; typedef struct tagDPLobbySPIUnknownData { - LONG ulObjRef; CRITICAL_SECTION DPLSP_lock; } DPLobbySPIUnknownData; @@ -48,13 +47,13 @@ typedef struct tagDPLobbySPData } DPLobbySPData; #define DPLSP_IMPL_FIELDS \ - LONG ulInterfaceRef; \ DPLobbySPIUnknownData* unk; \ DPLobbySPData* sp; struct IDPLobbySPImpl { const IDPLobbySPVtbl *lpVtbl; + LONG ref; DPLSP_IMPL_FIELDS }; @@ -165,79 +164,47 @@ static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ) } static HRESULT WINAPI IDPLobbySPImpl_QueryInterface( IDPLobbySP *iface, REFIID riid, - void **ppvObj ) + void **ppv ) { - IDPLobbySPImpl *This = (IDPLobbySPImpl *)iface; - TRACE("(%p)->(%s,%p)\n", This, debugstr_guid( riid ), ppvObj ); + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid( riid ), ppv ); - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( *This ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - CopyMemory( *ppvObj, This, sizeof( *This ) ); - (*(IDPLobbySPImpl**)ppvObj)->ulInterfaceRef = 0; - - if( IsEqualGUID( &IID_IDPLobbySP, riid ) ) - { - IDPLobbySPImpl *This = *ppvObj; - This->lpVtbl = &dpLobbySPVT; - } - else + if ( IsEqualGUID( &IID_IUnknown, riid ) || IsEqualGUID( &IID_IDPLobbySP, riid ) ) { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; + *ppv = iface; + IDPLobbySP_AddRef(iface); + return S_OK; } - IDPLobbySP_AddRef( (LPDPLOBBYSP)*ppvObj ); - - return S_OK; + FIXME("Unsupported interface %s\n", debugstr_guid(riid)); + *ppv = NULL; + return E_NOINTERFACE; } static ULONG WINAPI IDPLobbySPImpl_AddRef( IDPLobbySP *iface ) { IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); - ULONG ulInterfaceRefCount, ulObjRefCount; - - ulObjRefCount = InterlockedIncrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedIncrement( &This->ulInterfaceRef ); + ULONG ref = InterlockedIncrement( &This->ref ); - TRACE( "ref count incremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); + TRACE( "(%p) ref=%d\n", This, ref ); - return ulObjRefCount; + return ref; } static ULONG WINAPI IDPLobbySPImpl_Release( IDPLobbySP *iface ) { IDPLobbySPImpl *This = impl_from_IDPLobbySP( iface ); - ULONG ulInterfaceRefCount, ulObjRefCount; - - ulObjRefCount = InterlockedDecrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedDecrement( &This->ulInterfaceRef ); + ULONG ref = InterlockedDecrement( &This->ref ); - TRACE( "ref count decremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - /* Deallocate if this is the last reference to the object */ - if( ulObjRefCount == 0 ) - { - DPLSP_DestroyDPLobbySP( This ); - DPLSP_DestroyIUnknown( This ); - } + TRACE( "(%p) ref=%d\n", This, ref ); - if( ulInterfaceRefCount == 0 ) + if( !ref ) { + DPLSP_DestroyDPLobbySP( This ); + DPLSP_DestroyIUnknown( This ); HeapFree( GetProcessHeap(), 0, This ); } - return ulInterfaceRefCount; + return ref; } static HRESULT WINAPI IDPLobbySPImpl_AddGroupToGroup( IDPLobbySP *iface,
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
65
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
Results per page:
10
25
50
100
200