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
83e197df
Commit
83e197df
authored
Jul 31, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Use proper names for namespaced interfaces in C declaration.
parent
99d296b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
header.c
tools/widl/header.c
+16
-20
No files found.
tools/widl/header.c
View file @
83e197df
...
@@ -1106,12 +1106,12 @@ static void do_write_c_method_def(FILE *header, const type_t *iface, const char
...
@@ -1106,12 +1106,12 @@ static void do_write_c_method_def(FILE *header, const type_t *iface, const char
static
void
write_c_method_def
(
FILE
*
header
,
const
type_t
*
iface
)
static
void
write_c_method_def
(
FILE
*
header
,
const
type_t
*
iface
)
{
{
do_write_c_method_def
(
header
,
iface
,
iface
->
name
);
do_write_c_method_def
(
header
,
iface
,
iface
->
c_
name
);
}
}
static
void
write_c_disp_method_def
(
FILE
*
header
,
const
type_t
*
iface
)
static
void
write_c_disp_method_def
(
FILE
*
header
,
const
type_t
*
iface
)
{
{
do_write_c_method_def
(
header
,
type_iface_get_inherit
(
iface
),
iface
->
name
);
do_write_c_method_def
(
header
,
type_iface_get_inherit
(
iface
),
iface
->
c_
name
);
}
}
static
void
write_method_proto
(
FILE
*
header
,
const
type_t
*
iface
)
static
void
write_method_proto
(
FILE
*
header
,
const
type_t
*
iface
)
...
@@ -1264,8 +1264,8 @@ static void write_com_interface_start(FILE *header, const type_t *iface)
...
@@ -1264,8 +1264,8 @@ static void write_com_interface_start(FILE *header, const type_t *iface)
fprintf
(
header
,
"/*****************************************************************************
\n
"
);
fprintf
(
header
,
"/*****************************************************************************
\n
"
);
fprintf
(
header
,
" * %s %sinterface
\n
"
,
iface
->
name
,
dispinterface
?
"disp"
:
""
);
fprintf
(
header
,
" * %s %sinterface
\n
"
,
iface
->
name
,
dispinterface
?
"disp"
:
""
);
fprintf
(
header
,
" */
\n
"
);
fprintf
(
header
,
" */
\n
"
);
fprintf
(
header
,
"#ifndef __%s_%sINTERFACE_DEFINED__
\n
"
,
iface
->
name
,
dispinterface
?
"DISP"
:
""
);
fprintf
(
header
,
"#ifndef __%s_%sINTERFACE_DEFINED__
\n
"
,
iface
->
c_
name
,
dispinterface
?
"DISP"
:
""
);
fprintf
(
header
,
"#define __%s_%sINTERFACE_DEFINED__
\n\n
"
,
iface
->
name
,
dispinterface
?
"DISP"
:
""
);
fprintf
(
header
,
"#define __%s_%sINTERFACE_DEFINED__
\n\n
"
,
iface
->
c_
name
,
dispinterface
?
"DISP"
:
""
);
}
}
static
void
write_com_interface_end
(
FILE
*
header
,
type_t
*
iface
)
static
void
write_com_interface_end
(
FILE
*
header
,
type_t
*
iface
)
...
@@ -1275,7 +1275,7 @@ static void write_com_interface_end(FILE *header, type_t *iface)
...
@@ -1275,7 +1275,7 @@ static void write_com_interface_end(FILE *header, type_t *iface)
type_t
*
type
;
type_t
*
type
;
if
(
uuid
)
if
(
uuid
)
write_guid
(
header
,
dispinterface
?
"DIID"
:
"IID"
,
iface
->
name
,
uuid
);
write_guid
(
header
,
dispinterface
?
"DIID"
:
"IID"
,
iface
->
c_
name
,
uuid
);
/* C++ interface */
/* C++ interface */
fprintf
(
header
,
"#if defined(__cplusplus) && !defined(CINTERFACE)
\n
"
);
fprintf
(
header
,
"#if defined(__cplusplus) && !defined(CINTERFACE)
\n
"
);
...
@@ -1317,29 +1317,25 @@ static void write_com_interface_end(FILE *header, type_t *iface)
...
@@ -1317,29 +1317,25 @@ static void write_com_interface_end(FILE *header, type_t *iface)
write_uuid_decl
(
header
,
iface
->
name
,
uuid
);
write_uuid_decl
(
header
,
iface
->
name
,
uuid
);
fprintf
(
header
,
"#else
\n
"
);
fprintf
(
header
,
"#else
\n
"
);
/* C interface */
/* C interface */
fprintf
(
header
,
"typedef struct %sVtbl {
\n
"
,
iface
->
name
);
write_line
(
header
,
1
,
"typedef struct %sVtbl {"
,
iface
->
c_name
);
indentation
++
;
write_line
(
header
,
0
,
"BEGIN_INTERFACE
\n
"
);
fprintf
(
header
,
" BEGIN_INTERFACE
\n
"
);
fprintf
(
header
,
"
\n
"
);
if
(
dispinterface
)
if
(
dispinterface
)
write_c_disp_method_def
(
header
,
iface
);
write_c_disp_method_def
(
header
,
iface
);
else
else
write_c_method_def
(
header
,
iface
);
write_c_method_def
(
header
,
iface
);
indentation
--
;
write_line
(
header
,
0
,
"END_INTERFACE"
);
fprintf
(
header
,
" END_INTERFACE
\n
"
);
write_line
(
header
,
-
1
,
"} %sVtbl;
\n
"
,
iface
->
c_name
);
fprintf
(
header
,
"} %sVtbl;
\n
"
,
iface
->
name
);
fprintf
(
header
,
"interface %s {
\n
"
,
iface
->
c_name
);
fprintf
(
header
,
"interface %s {
\n
"
,
iface
->
name
);
fprintf
(
header
,
" CONST_VTBL %sVtbl* lpVtbl;
\n
"
,
iface
->
c_name
);
fprintf
(
header
,
" CONST_VTBL %sVtbl* lpVtbl;
\n
"
,
iface
->
name
);
fprintf
(
header
,
"};
\n\n
"
);
fprintf
(
header
,
"};
\n
"
);
fprintf
(
header
,
"
\n
"
);
fprintf
(
header
,
"#ifdef COBJMACROS
\n
"
);
fprintf
(
header
,
"#ifdef COBJMACROS
\n
"
);
/* dispinterfaces don't have real functions, so don't write macros for them,
/* dispinterfaces don't have real functions, so don't write macros for them,
* only for the interface this interface inherits from, i.e. IDispatch */
* only for the interface this interface inherits from, i.e. IDispatch */
fprintf
(
header
,
"#ifndef WIDL_C_INLINE_WRAPPERS
\n
"
);
fprintf
(
header
,
"#ifndef WIDL_C_INLINE_WRAPPERS
\n
"
);
type
=
dispinterface
?
type_iface_get_inherit
(
iface
)
:
iface
;
type
=
dispinterface
?
type_iface_get_inherit
(
iface
)
:
iface
;
write_method_macro
(
header
,
type
,
type
,
iface
->
name
);
write_method_macro
(
header
,
type
,
type
,
iface
->
c_
name
);
fprintf
(
header
,
"#else
\n
"
);
fprintf
(
header
,
"#else
\n
"
);
write_inline_wrappers
(
header
,
type
,
type
,
iface
->
name
);
write_inline_wrappers
(
header
,
type
,
type
,
iface
->
c_
name
);
fprintf
(
header
,
"#endif
\n
"
);
fprintf
(
header
,
"#endif
\n
"
);
fprintf
(
header
,
"#endif
\n
"
);
fprintf
(
header
,
"#endif
\n
"
);
fprintf
(
header
,
"
\n
"
);
fprintf
(
header
,
"
\n
"
);
...
@@ -1347,13 +1343,13 @@ static void write_com_interface_end(FILE *header, type_t *iface)
...
@@ -1347,13 +1343,13 @@ static void write_com_interface_end(FILE *header, type_t *iface)
fprintf
(
header
,
"
\n
"
);
fprintf
(
header
,
"
\n
"
);
/* dispinterfaces don't have real functions, so don't write prototypes for
/* dispinterfaces don't have real functions, so don't write prototypes for
* them */
* them */
if
(
!
dispinterface
)
if
(
!
dispinterface
&&
!
winrt_mode
)
{
{
write_method_proto
(
header
,
iface
);
write_method_proto
(
header
,
iface
);
write_locals
(
header
,
iface
,
FALSE
);
write_locals
(
header
,
iface
,
FALSE
);
fprintf
(
header
,
"
\n
"
);
fprintf
(
header
,
"
\n
"
);
}
}
fprintf
(
header
,
"#endif /* __%s_%sINTERFACE_DEFINED__ */
\n\n
"
,
iface
->
name
,
dispinterface
?
"DISP"
:
""
);
fprintf
(
header
,
"#endif /* __%s_%sINTERFACE_DEFINED__ */
\n\n
"
,
iface
->
c_
name
,
dispinterface
?
"DISP"
:
""
);
}
}
static
void
write_rpc_interface_start
(
FILE
*
header
,
const
type_t
*
iface
)
static
void
write_rpc_interface_start
(
FILE
*
header
,
const
type_t
*
iface
)
...
...
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