Alexandre Julliard : widl: Allow specifying a class version outside of a typelib too.
Alexandre Julliard
julliard at winehq.org
Thu Dec 23 11:28:01 CST 2010
Module: wine
Branch: master
Commit: 90c7acf845c260aace38b2abee237024908b7bf9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=90c7acf845c260aace38b2abee237024908b7bf9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Dec 23 12:50:35 2010 +0100
widl: Allow specifying a class version outside of a typelib too.
---
tools/widl/register.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/widl/register.c b/tools/widl/register.c
index d58fc0a..6b9980f 100644
--- a/tools/widl/register.c
+++ b/tools/widl/register.c
@@ -121,6 +121,7 @@ static int write_coclass( const type_t *class, const typelib_t *typelib )
const char *progid = get_attrp( class->attrs, ATTR_PROGID );
const char *vi_progid = get_attrp( class->attrs, ATTR_VIPROGID );
const char *threading = get_coclass_threading( class );
+ unsigned int version = get_attrv( class->attrs, ATTR_VERSION );
if (!uuid) return 0;
if (typelib && !threading) return 0;
@@ -134,11 +135,10 @@ static int write_coclass( const type_t *class, const typelib_t *typelib )
if (typelib)
{
const UUID *typelib_uuid = get_attrp( typelib->attrs, ATTR_UUID );
- unsigned int version = get_attrv( class->attrs, ATTR_VERSION );
- if (!version) version = get_attrv( typelib->attrs, ATTR_VERSION );
put_str( indent, "TypeLib = s '%s'\n", format_uuid( typelib_uuid ));
- put_str( indent, "Version = s '%u.%u'\n", MAJORVERSION(version), MINORVERSION(version) );
+ if (!version) version = get_attrv( typelib->attrs, ATTR_VERSION );
}
+ if (version) put_str( indent, "Version = s '%u.%u'\n", MAJORVERSION(version), MINORVERSION(version) );
if (vi_progid) put_str( indent, "VersionIndependentProgId = s '%s'\n", vi_progid );
put_str( --indent, "}\n" );
return 1;
More information about the wine-cvs
mailing list