Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2dc85894
Commit
2dc85894
authored
Dec 08, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Improve registration of coclasses contained in typelibs.
parent
a5469283
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
register.c
tools/widl/register.c
+14
-9
No files found.
tools/widl/register.c
View file @
2dc85894
...
@@ -90,15 +90,13 @@ static int write_interfaces( const statement_list_t *stmts )
...
@@ -90,15 +90,13 @@ static int write_interfaces( const statement_list_t *stmts )
if
(
stmts
)
LIST_FOR_EACH_ENTRY
(
stmt
,
stmts
,
const
statement_t
,
entry
)
if
(
stmts
)
LIST_FOR_EACH_ENTRY
(
stmt
,
stmts
,
const
statement_t
,
entry
)
{
{
if
(
stmt
->
type
==
STMT_LIBRARY
)
if
(
stmt
->
type
==
STMT_TYPE
&&
type_get_type
(
stmt
->
u
.
type
)
==
TYPE_INTERFACE
)
count
+=
write_interfaces
(
stmt
->
u
.
lib
->
stmts
);
else
if
(
stmt
->
type
==
STMT_TYPE
&&
type_get_type
(
stmt
->
u
.
type
)
==
TYPE_INTERFACE
)
count
+=
write_interface
(
stmt
->
u
.
type
);
count
+=
write_interface
(
stmt
->
u
.
type
);
}
}
return
count
;
return
count
;
}
}
static
int
write_coclass
(
const
type_t
*
class
)
static
int
write_coclass
(
const
type_t
*
class
,
const
typelib_t
*
typelib
)
{
{
const
UUID
*
uuid
=
get_attrp
(
class
->
attrs
,
ATTR_UUID
);
const
UUID
*
uuid
=
get_attrp
(
class
->
attrs
,
ATTR_UUID
);
const
char
*
descr
=
get_attrp
(
class
->
attrs
,
ATTR_HELPSTRING
);
const
char
*
descr
=
get_attrp
(
class
->
attrs
,
ATTR_HELPSTRING
);
...
@@ -107,20 +105,27 @@ static int write_coclass( const type_t *class )
...
@@ -107,20 +105,27 @@ static int write_coclass( const type_t *class )
const
char
*
threading
=
get_coclass_threading
(
class
);
const
char
*
threading
=
get_coclass_threading
(
class
);
if
(
!
uuid
)
return
0
;
if
(
!
uuid
)
return
0
;
if
(
typelib
&&
!
threading
)
return
0
;
if
(
!
descr
)
descr
=
class
->
name
;
if
(
!
descr
)
descr
=
class
->
name
;
put_str
(
indent
,
"ForceRemove '%s' = s '%s'
\n
"
,
format_uuid
(
uuid
),
descr
);
put_str
(
indent
,
"ForceRemove '%s' = s '%s'
\n
"
,
format_uuid
(
uuid
),
descr
);
put_str
(
indent
++
,
"{
\n
"
);
put_str
(
indent
++
,
"{
\n
"
);
if
(
threading
)
put_str
(
indent
,
"InprocServer32 = s '%%MODULE%%' { val ThreadingModel = s '%s' }
\n
"
,
if
(
threading
)
put_str
(
indent
,
"InprocServer32 = s '%%MODULE%%' { val ThreadingModel = s '%s' }
\n
"
,
threading
);
threading
);
if
(
progid
||
vi_progid
)
put_str
(
indent
,
"CLSID = s '%s'
\n
"
,
descr
);
if
(
progid
)
put_str
(
indent
,
"ProgId = s '%s'
\n
"
,
progid
);
if
(
progid
)
put_str
(
indent
,
"ProgId = s '%s'
\n
"
,
progid
);
if
(
typelib
)
{
const
UUID
*
typelib_uuid
=
get_attrp
(
typelib
->
attrs
,
ATTR_UUID
);
const
unsigned
int
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
(
vi_progid
)
put_str
(
indent
,
"VersionIndependentProgId = s '%s'
\n
"
,
vi_progid
);
if
(
vi_progid
)
put_str
(
indent
,
"VersionIndependentProgId = s '%s'
\n
"
,
vi_progid
);
put_str
(
--
indent
,
"}
\n
"
);
put_str
(
--
indent
,
"}
\n
"
);
return
1
;
return
1
;
}
}
static
void
write_coclasses
(
const
statement_list_t
*
stmts
,
const
UUID
*
typelib_uuid
)
static
void
write_coclasses
(
const
statement_list_t
*
stmts
,
const
typelib_t
*
typelib
)
{
{
const
statement_t
*
stmt
;
const
statement_t
*
stmt
;
...
@@ -129,12 +134,12 @@ static void write_coclasses( const statement_list_t *stmts, const UUID *typelib_
...
@@ -129,12 +134,12 @@ static void write_coclasses( const statement_list_t *stmts, const UUID *typelib_
if
(
stmt
->
type
==
STMT_TYPE
)
if
(
stmt
->
type
==
STMT_TYPE
)
{
{
const
type_t
*
type
=
stmt
->
u
.
type
;
const
type_t
*
type
=
stmt
->
u
.
type
;
if
(
type_get_type
(
type
)
==
TYPE_COCLASS
)
write_coclass
(
type
);
if
(
type_get_type
(
type
)
==
TYPE_COCLASS
)
write_coclass
(
type
,
typelib
);
}
}
else
if
(
stmt
->
type
==
STMT_LIBRARY
)
else
if
(
stmt
->
type
==
STMT_LIBRARY
)
{
{
const
UUID
*
uuid
=
get_attrp
(
stmt
->
u
.
lib
->
attrs
,
ATTR_UUID
)
;
const
typelib_t
*
lib
=
stmt
->
u
.
lib
;
write_coclasses
(
stmt
->
u
.
lib
->
stmts
,
uuid
);
write_coclasses
(
lib
->
stmts
,
lib
);
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment