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 2018
----- 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
951 discussions
Start a n
N
ew thread
Alexandre Julliard : Wine release 3.20
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: website Branch: master Commit: ac539bc51cbf03386354f3ec26c3eef053ff306a URL:
https://source.winehq.org/git/website.git/?a=commit;h=ac539bc51cbf03386354f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 9 21:12:37 2018 +0100 Wine release 3.20 Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- news/en/2018110901.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/news/en/2018110901.xml b/news/en/2018110901.xml new file mode 100644 index 0000000..9cd4475 --- /dev/null +++ b/news/en/2018110901.xml @@ -0,0 +1,17 @@ +<news> +<date>November 9, 2018</date> +<title>Wine 3.20 Released</title> +<body> +<p> The Wine development release 3.20 is now available.</p> +<p> <a href="{$root}/announce/3.20">What's new</a> in this release: +<ul> + <li>Async interfaces and ACF files in the IDL compiler.</li> + <li>Support for substorage transforms in MSI.</li> + <li>RPC/COM marshalling fixes.</li> + <li>Support for Unicode requests in WinHTTP.</li> + <li>Shell Autocomplete optimizations.</li> + <li>Various bug fixes.</li> +</ul> +<p>The source is <a href="//dl.winehq.org/wine/source/3.x/wine-3.20.tar.xz">available now</a>. +Binary packages are in the process of being built, and will appear soon at their respective <a href="{$root}/download">download locations</a>. +</p></body></news>
1
0
0
0
Michael Stefaniuc : appwiz.cpl: Use the ARRAY_SIZE() macro.
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: wine Branch: master Commit: 68a47a8b067bc451a5bffce30f23a35b12109ee9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=68a47a8b067bc451a5bffce3…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Nov 9 19:03:40 2018 +0100 appwiz.cpl: Use the ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/appwiz.cpl/addons.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/appwiz.cpl/addons.c b/dlls/appwiz.cpl/addons.c index 4e87467..c34101f 100644 --- a/dlls/appwiz.cpl/addons.c +++ b/dlls/appwiz.cpl/addons.c @@ -636,14 +636,14 @@ static void append_url_params( WCHAR *url ) DWORD len = strlenW(url); memcpy(url+len, arch_formatW, sizeof(arch_formatW)); - len += sizeof(arch_formatW)/sizeof(WCHAR); + len += ARRAY_SIZE(arch_formatW); len += MultiByteToWideChar(CP_ACP, 0, ARCH_STRING, sizeof(ARCH_STRING), url+len, size/sizeof(WCHAR)-len)-1; memcpy(url+len, v_formatW, sizeof(v_formatW)); - len += sizeof(v_formatW)/sizeof(WCHAR); + len += ARRAY_SIZE(v_formatW); len += MultiByteToWideChar(CP_ACP, 0, addon->version, -1, url+len, size/sizeof(WCHAR)-len)-1; memcpy(url+len, winevW, sizeof(winevW)); - len += sizeof(winevW)/sizeof(WCHAR); + len += ARRAY_SIZE(winevW); MultiByteToWideChar(CP_ACP, 0, PACKAGE_VERSION, -1, url+len, size/sizeof(WCHAR)-len); } @@ -717,9 +717,9 @@ static void run_winebrowser(const WCHAR *url) url_len = strlenW(url); - len = GetSystemDirectoryW(app, MAX_PATH-sizeof(winebrowserW)/sizeof(WCHAR)); + len = GetSystemDirectoryW(app, MAX_PATH - ARRAY_SIZE(winebrowserW)); memcpy(app+len, winebrowserW, sizeof(winebrowserW)); - len += sizeof(winebrowserW)/sizeof(WCHAR) -1; + len += ARRAY_SIZE(winebrowserW) - 1; args = heap_alloc((len+1+url_len)*sizeof(WCHAR)); if(!args)
1
0
0
0
Hans Leidekker : winhttp/tests: Avoid an invalid write in asynchronous mode (Valgrind).
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: wine Branch: master Commit: 165000d4573f3b46c4dd791c33ce7db443c19537 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=165000d4573f3b46c4dd791c…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Nov 9 14:55:00 2018 +0100 winhttp/tests: Avoid an invalid write in asynchronous mode (Valgrind). Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winhttp/tests/notification.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c index 086f2e7..510d9e7 100644 --- a/dlls/winhttp/tests/notification.c +++ b/dlls/winhttp/tests/notification.c @@ -920,7 +920,7 @@ static const struct notification read_allow_close_test[] = static void _read_request_data(struct test_request *req, struct info *info, const char *expected_data, BOOL closing_connection, unsigned line) { char buffer[1024]; - DWORD read, len; + DWORD len; BOOL ret; if (closing_connection) @@ -937,8 +937,7 @@ static void _read_request_data(struct test_request *req, struct info *info, cons setup_test( info, winhttp_read_data, line ); memset(buffer, '?', sizeof(buffer)); - read = 0xdeadbeef; - ret = WinHttpReadData( req->request, buffer, sizeof(buffer), &read ); + ret = WinHttpReadData( req->request, buffer, sizeof(buffer), NULL ); ok(ret, "failed to read data %u\n", GetLastError()); WaitForSingleObject( info->wait, INFINITE );
1
0
0
0
Hans Leidekker : rsaenh: Fix a memory leak (Valgrind).
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: wine Branch: master Commit: 633779b4728f635646f4f8d8bbd940cec3feeb48 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=633779b4728f635646f4f8d8…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Nov 9 14:54:59 2018 +0100 rsaenh: Fix a memory leak (Valgrind). Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rsaenh/rsaenh.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index bc10fc7..c22b3dc 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -3628,17 +3628,18 @@ BOOL WINAPI RSAENH_CPGetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa &pCryptHash->tpPRFParams.blobSeed, pbData, *pdwDataLen); } - if ( pbData == NULL ) { - *pdwDataLen = pCryptHash->dwHashSize; - return TRUE; - } - - if (pbData && (pCryptHash->dwState != RSAENH_HASHSTATE_FINISHED)) + if (pCryptHash->dwState != RSAENH_HASHSTATE_FINISHED) { finalize_hash(pCryptHash); pCryptHash->dwState = RSAENH_HASHSTATE_FINISHED; } + if (!pbData) + { + *pdwDataLen = pCryptHash->dwHashSize; + return TRUE; + } + return copy_param(pbData, pdwDataLen, pCryptHash->abHashValue, pCryptHash->dwHashSize);
1
0
0
0
Alexandre Julliard : Release 3.20.
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: wine Branch: master Commit: e9e12bda62fee68e9fbac5849f7ad1e199ee38b7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e9e12bda62fee68e9fbac584…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 9 21:10:16 2018 +0100 Release 3.20. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- ANNOUNCE | 684 +++++++++++++++++++++++++++++++------------------------------- VERSION | 2 +- configure | 18 +- 3 files changed, 356 insertions(+), 348 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e9e12bda62fee68e9fba…
1
0
0
0
Hans Leidekker : msi: Support substorage transforms in MsiDatabaseApplyTransform.
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: wine Branch: master Commit: ef86011ba40ef90eefb5e54059d907753ec8d694 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ef86011ba40ef90eefb5e540…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Nov 9 14:50:34 2018 +0100 msi: Support substorage transforms in MsiDatabaseApplyTransform. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=40206
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msi/msiquery.c | 68 +++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c index 701a347..db5660a 100644 --- a/dlls/msi/msiquery.c +++ b/dlls/msi/msiquery.c @@ -824,50 +824,55 @@ MSIHANDLE WINAPI MsiGetLastErrorRecord( void ) return 0; } -UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db, - LPCWSTR szTransformFile, int iErrorCond ) +UINT MSI_DatabaseApplyTransformW( MSIDATABASE *db, const WCHAR *transform, int error_cond ) { - HRESULT r; + HRESULT hr; UINT ret = ERROR_FUNCTION_FAILED; - IStorage *stg = NULL; + IStorage *stg; STATSTG stat; - TRACE("%p %s %d\n", db, debugstr_w(szTransformFile), iErrorCond); + TRACE( "%p %s %08x\n", db, debugstr_w(transform), error_cond ); - r = StgOpenStorage( szTransformFile, NULL, - STGM_DIRECT|STGM_READ|STGM_SHARE_DENY_WRITE, NULL, 0, &stg); - if ( FAILED(r) ) + if (*transform == ':') { - WARN("failed to open transform 0x%08x\n", r); - return ret; + hr = IStorage_OpenStorage( db->storage, transform + 1, NULL, STGM_SHARE_EXCLUSIVE, NULL, 0, &stg ); + if (FAILED( hr )) + { + WARN( "failed to open substorage transform 0x%08x\n", hr ); + return ERROR_FUNCTION_FAILED; + } + } + else + { + hr = StgOpenStorage( transform, NULL, STGM_DIRECT|STGM_READ|STGM_SHARE_DENY_WRITE, NULL, 0, &stg ); + if (FAILED( hr )) + { + WARN( "failed to open file transform 0x%08x\n", hr ); + return ERROR_FUNCTION_FAILED; + } } - r = IStorage_Stat( stg, &stat, STATFLAG_NONAME ); - if ( FAILED( r ) ) - goto end; - - if ( !IsEqualGUID( &stat.clsid, &CLSID_MsiTransform ) ) - goto end; - - if( TRACE_ON( msi ) ) - enum_stream_names( stg ); + hr = IStorage_Stat( stg, &stat, STATFLAG_NONAME ); + if (FAILED( hr )) goto end; + if (!IsEqualGUID( &stat.clsid, &CLSID_MsiTransform )) goto end; + if (TRACE_ON( msi )) enum_stream_names( stg ); ret = msi_table_apply_transform( db, stg ); end: IStorage_Release( stg ); - return ret; } -UINT WINAPI MsiDatabaseApplyTransformW( MSIHANDLE hdb, - LPCWSTR szTransformFile, int iErrorCond) +UINT WINAPI MsiDatabaseApplyTransformW( MSIHANDLE hdb, const WCHAR *transform, int error_cond ) { MSIDATABASE *db; UINT r; + if (error_cond) FIXME( "ignoring error conditions\n" ); + db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); - if( !db ) + if (!db) { MSIHANDLE remote; @@ -879,27 +884,24 @@ UINT WINAPI MsiDatabaseApplyTransformW( MSIHANDLE hdb, return ERROR_SUCCESS; } - r = MSI_DatabaseApplyTransformW( db, szTransformFile, iErrorCond ); + r = MSI_DatabaseApplyTransformW( db, transform, error_cond ); msiobj_release( &db->hdr ); return r; } -UINT WINAPI MsiDatabaseApplyTransformA( MSIHANDLE hdb, - LPCSTR szTransformFile, int iErrorCond) +UINT WINAPI MsiDatabaseApplyTransformA( MSIHANDLE hdb, const char *transform, int error_cond ) { - LPWSTR wstr; + WCHAR *wstr; UINT ret; - TRACE("%d %s %d\n", hdb, debugstr_a(szTransformFile), iErrorCond); + TRACE( "%d %s %08x\n", hdb, debugstr_a(transform), error_cond ); - wstr = strdupAtoW( szTransformFile ); - if( szTransformFile && !wstr ) + wstr = strdupAtoW( transform ); + if (transform && !wstr) return ERROR_NOT_ENOUGH_MEMORY; - ret = MsiDatabaseApplyTransformW( hdb, wstr, iErrorCond); - + ret = MsiDatabaseApplyTransformW( hdb, wstr, error_cond ); msi_free( wstr ); - return ret; }
1
0
0
0
Tag wine-3.20 : Alexandre Julliard : Release 3.20
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: wine Branch: refs/tags/wine-3.20 Tag: a161057591a9b7671a48870bf04549c93c1614c1 URL:
https://source.winehq.org/git/wine.git/?a=tag;h=a161057591a9b7671a48870bf04…
Tagger: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 9 21:10:17 2018 +0100 Release 3.20
1
0
0
0
Jacek Caban : widl: Add basic acf parser implementation.
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: wine Branch: master Commit: 90748c581be41ecadcc6a0b38687900d0f7d1bba URL:
https://source.winehq.org/git/wine.git/?a=commit;h=90748c581be41ecadcc6a0b3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 9 13:51:04 2018 +0100 widl: Add basic acf parser implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/parser.y | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 542ee43..d979394 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -266,8 +266,9 @@ static typelib_t *current_typelib; %token tWCHAR tWIREMARSHAL %token tAPARTMENT tNEUTRAL tSINGLE tFREE tBOTH -%type <attr> attribute type_qualifier function_specifier +%type <attr> attribute type_qualifier function_specifier acf_attribute %type <attr_list> m_attributes attributes attrib_list m_type_qual_list +%type <attr_list> acf_attributes acf_attribute_list %type <str_list> str_list %type <expr> m_expr expr expr_const expr_int_const array m_bitfield %type <expr_list> m_exprs /* exprs expr_list */ expr_list_int_const @@ -1154,6 +1155,37 @@ version: acf_statements : /* empty */ + | acf_interface acf_statements + +acf_int_statements + : /* empty */ + | acf_int_statement acf_int_statements + +acf_int_statement + : tTYPEDEF acf_attributes aKNOWNTYPE ';' + { type_t *type = find_type_or_error($3, 0); + type->attrs = append_attr_list(type->attrs, $2); + } +acf_interface + : acf_attributes tINTERFACE aKNOWNTYPE '{' acf_int_statements '}' + { type_t *iface = find_type_or_error2($3, 0); + if (type_get_type(iface) != TYPE_INTERFACE) + error_loc("%s is not an interface\n", iface->name); + iface->attrs = append_attr_list(iface->attrs, $1); + } + +acf_attributes + : /* empty */ { $$ = NULL; }; + | '[' acf_attribute_list ']' { $$ = $2; }; + +acf_attribute_list + : acf_attribute { $$ = append_attr(NULL, $1); } + | acf_attribute_list ',' acf_attribute { $$ = append_attr($1, $3); } + +acf_attribute + : tENCODE { $$ = make_attr(ATTR_ENCODE); } + | tDECODE { $$ = make_attr(ATTR_DECODE); } + | tEXPLICITHANDLE { $$ = make_attr(ATTR_EXPLICIT_HANDLE); } %%
1
0
0
0
Jacek Caban : widl: Add support for serialization functions.
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: wine Branch: master Commit: fb5d6c672f7b697fc5464a2bc303825183005858 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fb5d6c672f7b697fc5464a2b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 9 13:51:23 2018 +0100 widl: Add support for serialization functions. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/client.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 86 insertions(+), 10 deletions(-) diff --git a/tools/widl/client.c b/tools/widl/client.c index b05c3c9..a3b2bbb 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -290,10 +290,49 @@ static void write_function_stub( const type_t *iface, const var_t *func, static void write_serialize_function(FILE *file, const type_t *type, const type_t *iface, const char *func_name, const char *ret_type) { + enum stub_mode mode = get_stub_mode(); + static int emited_pickling_info; + + if (iface && !type->typestring_offset) + { + /* FIXME: Those are mostly basic types. They should be implemented + * using NdrMesSimpleType* functions */ + if (ret_type) warning("Serialization of type %s is not supported\n", type->name); + return; + } + + if (!emited_pickling_info && iface && mode != MODE_Os) + { + fprintf(file, "static const MIDL_TYPE_PICKLING_INFO __MIDL_TypePicklingInfo =\n"); + fprintf(file, "{\n"); + fprintf(file, " 0x33205054,\n"); + fprintf(file, " 0x3,\n"); + fprintf(file, " 0,\n"); + fprintf(file, " 0,\n"); + fprintf(file, " 0\n"); + fprintf(file, "};\n"); + fprintf(file, "\n"); + emited_pickling_info = 1; + } + /* FIXME: Assuming explicit handle */ fprintf(file, "%s __cdecl %s_%s(handle_t IDL_handle, %s *IDL_type)%s\n", ret_type ? ret_type : "void", type->name, func_name, type->name, iface ? "" : ";"); + if (!iface) return; /* declaration only */ + + fprintf(file, "{\n"); + fprintf(file, " %sNdrMesType%s%s(\n", ret_type ? "return " : "", func_name, + mode != MODE_Os ? "2" : ""); + fprintf(file, " IDL_handle,\n"); + if (mode != MODE_Os) + fprintf(file, " (MIDL_TYPE_PICKLING_INFO*)&__MIDL_TypePicklingInfo,\n"); + fprintf(file, " &%s_StubDesc,\n", iface->name); + fprintf(file, " (PFORMAT_STRING)&__MIDL_TypeFormatString.Format[%u],\n", + type->typestring_offset); + fprintf(file, " IDL_type);\n"); + fprintf(file, "}\n"); + fprintf(file, "\n"); } void write_serialize_functions(FILE *file, const type_t *type, const type_t *iface) @@ -319,11 +358,30 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset) if (!implicit_handle) print_client("static RPC_BINDING_HANDLE %s__MIDL_AutoBindHandle;\n\n", iface->name); - STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) + LIST_FOR_EACH_ENTRY( stmt, type_iface_get_stmts(iface), const statement_t, entry ) { - const var_t *func = stmt->u.var; - write_function_stub( iface, func, method_count++, *proc_offset ); - *proc_offset += get_size_procformatstring_func( iface, func ); + switch (stmt->type) + { + case STMT_DECLARATION: + { + const var_t *func = stmt->u.var; + if (stmt->u.var->stgclass != STG_NONE + || type_get_type_detect_alias(stmt->u.var->type) != TYPE_FUNCTION) + continue; + write_function_stub( iface, func, method_count++, *proc_offset ); + *proc_offset += get_size_procformatstring_func( iface, func ); + break; + } + case STMT_TYPEDEF: + { + const type_list_t *type_entry; + for (type_entry = stmt->u.type_list; type_entry; type_entry = type_entry->next) + write_serialize_functions(client, type_entry->type, iface); + break; + } + default: + break; + } } } @@ -461,7 +519,7 @@ static void write_client_ifaces(const statement_list_t *stmts, int expr_eval_rou { if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) { - int has_func = 0; + int needs_stub = 0; const statement_t *stmt2; type_t *iface = stmt->u.type; if (!need_stub(iface)) @@ -472,13 +530,31 @@ static void write_client_ifaces(const statement_list_t *stmts, int expr_eval_rou fprintf(client, " */\n"); fprintf(client, "\n"); - STATEMENTS_FOR_EACH_FUNC(stmt2, type_iface_get_stmts(iface)) + LIST_FOR_EACH_ENTRY(stmt2, type_iface_get_stmts(iface), const statement_t, entry) { - has_func = 1; - break; + if (stmt2->type == STMT_DECLARATION && stmt2->u.var->stgclass == STG_NONE && + type_get_type_detect_alias(stmt2->u.var->type) == TYPE_FUNCTION) + { + needs_stub = 1; + break; + } + if (stmt2->type == STMT_TYPEDEF) + { + const type_list_t *type_entry; + for (type_entry = stmt2->u.type_list; type_entry; type_entry = type_entry->next) + { + if (is_attr(type_entry->type->attrs, ATTR_ENCODE) + || is_attr(type_entry->type->attrs, ATTR_DECODE)) + { + needs_stub = 1; + break; + } + } + if (needs_stub) + break; + } } - - if (has_func) + if (needs_stub) { write_implicithandledecl(iface);
1
0
0
0
Jacek Caban : widl: Write serialize function declarations in header.
by Alexandre Julliard
09 Nov '18
09 Nov '18
Module: wine Branch: master Commit: dc03ca5e155e7b0daabcdd5cc2b18ae698047fda URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dc03ca5e155e7b0daabcdd5c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Nov 9 13:51:16 2018 +0100 widl: Write serialize function declarations in header. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/client.c | 23 +++++++++++++++++++++++ tools/widl/header.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- tools/widl/header.h | 2 ++ 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/tools/widl/client.c b/tools/widl/client.c index 8b3b139..b05c3c9 100644 --- a/tools/widl/client.c +++ b/tools/widl/client.c @@ -287,6 +287,29 @@ static void write_function_stub( const type_t *iface, const var_t *func, fprintf(client, "\n"); } +static void write_serialize_function(FILE *file, const type_t *type, const type_t *iface, + const char *func_name, const char *ret_type) +{ + /* FIXME: Assuming explicit handle */ + + fprintf(file, "%s __cdecl %s_%s(handle_t IDL_handle, %s *IDL_type)%s\n", + ret_type ? ret_type : "void", type->name, func_name, type->name, iface ? "" : ";"); +} + +void write_serialize_functions(FILE *file, const type_t *type, const type_t *iface) +{ + if (is_attr(type->attrs, ATTR_ENCODE)) + { + write_serialize_function(file, type, iface, "AlignSize", "SIZE_T"); + write_serialize_function(file, type, iface, "Encode", NULL); + } + if (is_attr(type->attrs, ATTR_DECODE)) + { + write_serialize_function(file, type, iface, "Decode", NULL); + write_serialize_function(file, type, iface, "Free", NULL); + } +} + static void write_function_stubs(type_t *iface, unsigned int *proc_offset) { const statement_t *stmt; diff --git a/tools/widl/header.c b/tools/widl/header.c index c4b26d3..defc7f8 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -716,6 +716,47 @@ void check_for_additional_prototype_types(const var_list_t *list) } } +static int write_serialize_function_decl(FILE *header, const type_t *type) +{ + write_serialize_functions(header, type, NULL); + return 1; +} + +static int serializable_exists(FILE *header, const type_t *type) +{ + return 0; +} + +static int for_each_serializable(const statement_list_t *stmts, FILE *header, + int (*proc)(FILE*, const type_t*)) +{ + statement_t *stmt, *iface_stmt; + statement_list_t *iface_stmts; + const type_list_t *type_entry; + + if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, statement_t, entry ) + { + if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE) + continue; + + iface_stmts = type_iface_get_stmts(stmt->u.type); + if (iface_stmts) LIST_FOR_EACH_ENTRY( iface_stmt, iface_stmts, statement_t, entry ) + { + if (iface_stmt->type != STMT_TYPEDEF) continue; + for (type_entry = iface_stmt->u.type_list; type_entry; type_entry = type_entry->next) + { + if (!is_attr(type_entry->type->attrs, ATTR_ENCODE) + && !is_attr(type_entry->type->attrs, ATTR_DECODE)) + continue; + if (!proc(header, type_entry->type)) + return 0; + } + } + } + + return 1; +} + static void write_user_types(FILE *header) { user_type_t *ut; @@ -1748,7 +1789,10 @@ void write_header(const statement_list_t *stmts) fprintf(header, "#endif\n\n"); fprintf(header, "#include <rpc.h>\n" ); - fprintf(header, "#include <rpcndr.h>\n\n" ); + fprintf(header, "#include <rpcndr.h>\n" ); + if (!for_each_serializable(stmts, NULL, serializable_exists)) + fprintf(header, "#include <midles.h>\n" ); + fprintf(header, "\n" ); fprintf(header, "#ifndef COM_NO_WINDOWS_H\n"); fprintf(header, "#include <windows.h>\n"); @@ -1770,6 +1814,7 @@ void write_header(const statement_list_t *stmts) fprintf(header, "/* Begin additional prototypes for all interfaces */\n"); fprintf(header, "\n"); + for_each_serializable(stmts, header, write_serialize_function_decl); write_user_types(header); write_generic_handle_routines(header); write_context_handle_rundowns(header); diff --git a/tools/widl/header.h b/tools/widl/header.h index 6222a48..0d44b40 100644 --- a/tools/widl/header.h +++ b/tools/widl/header.h @@ -54,6 +54,8 @@ extern const var_t *get_func_handle_var( const type_t *iface, const var_t *func, extern int has_out_arg_or_return(const var_t *func); extern int is_const_decl(const var_t *var); +extern void write_serialize_functions(FILE *file, const type_t *type, const type_t *iface); + static inline int is_ptr(const type_t *t) { return type_get_type(t) == TYPE_POINTER;
1
0
0
0
← Newer
1
...
74
75
76
77
78
79
80
...
96
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
Results per page:
10
25
50
100
200