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
511463f3
Commit
511463f3
authored
Feb 07, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Feb 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: More const attributes.
parent
417a61fa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
header.c
tools/widl/header.c
+18
-18
widltypes.h
tools/widl/widltypes.h
+1
-1
No files found.
tools/widl/header.c
View file @
511463f3
...
@@ -80,7 +80,7 @@ int is_void(const type_t *t, const var_t *v)
...
@@ -80,7 +80,7 @@ int is_void(const type_t *t, const var_t *v)
return
0
;
return
0
;
}
}
static
void
write_guid
(
const
char
*
guid_prefix
,
const
char
*
name
,
UUID
*
uuid
)
static
void
write_guid
(
const
char
*
guid_prefix
,
const
char
*
name
,
const
UUID
*
uuid
)
{
{
if
(
!
uuid
)
return
;
if
(
!
uuid
)
return
;
fprintf
(
header
,
"DEFINE_GUID(%s_%s, 0x%08lx, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
fprintf
(
header
,
"DEFINE_GUID(%s_%s, 0x%08lx, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
...
@@ -333,7 +333,7 @@ static int user_type_registered(const char *name)
...
@@ -333,7 +333,7 @@ static int user_type_registered(const char *name)
return
0
;
return
0
;
}
}
static
void
check_for_user_types
(
var_t
*
v
)
static
void
check_for_user_types
(
const
var_t
*
v
)
{
{
while
(
v
)
{
while
(
v
)
{
type_t
*
type
=
v
->
type
;
type_t
*
type
=
v
->
type
;
...
@@ -355,7 +355,7 @@ static void check_for_user_types(var_t *v)
...
@@ -355,7 +355,7 @@ static void check_for_user_types(var_t *v)
}
}
else
if
(
type
->
fields
)
else
if
(
type
->
fields
)
{
{
var_t
*
fields
=
type
->
fields
;
const
var_t
*
fields
=
type
->
fields
;
while
(
NEXT_LINK
(
fields
))
fields
=
NEXT_LINK
(
fields
);
while
(
NEXT_LINK
(
fields
))
fields
=
NEXT_LINK
(
fields
);
check_for_user_types
(
fields
);
check_for_user_types
(
fields
);
}
}
...
@@ -383,7 +383,7 @@ void write_user_types(void)
...
@@ -383,7 +383,7 @@ void write_user_types(void)
void
write_typedef
(
type_t
*
type
,
const
var_t
*
names
)
void
write_typedef
(
type_t
*
type
,
const
var_t
*
names
)
{
{
char
*
tname
=
names
->
tname
;
c
onst
c
har
*
tname
=
names
->
tname
;
const
var_t
*
lname
;
const
var_t
*
lname
;
while
(
NEXT_LINK
(
names
))
names
=
NEXT_LINK
(
names
);
while
(
NEXT_LINK
(
names
))
names
=
NEXT_LINK
(
names
);
lname
=
names
;
lname
=
names
;
...
@@ -654,9 +654,9 @@ static void write_cpp_method_def(const type_t *iface)
...
@@ -654,9 +654,9 @@ static void write_cpp_method_def(const type_t *iface)
}
}
}
}
static
void
do_write_c_method_def
(
const
type_t
*
iface
,
char
*
name
)
static
void
do_write_c_method_def
(
const
type_t
*
iface
,
c
onst
c
har
*
name
)
{
{
func_t
*
cur
=
iface
->
funcs
;
const
func_t
*
cur
=
iface
->
funcs
;
if
(
iface
->
ref
)
do_write_c_method_def
(
iface
->
ref
,
name
);
if
(
iface
->
ref
)
do_write_c_method_def
(
iface
->
ref
,
name
);
...
@@ -665,7 +665,7 @@ static void do_write_c_method_def(const type_t *iface, char *name)
...
@@ -665,7 +665,7 @@ static void do_write_c_method_def(const type_t *iface, char *name)
indent
(
header
,
0
);
indent
(
header
,
0
);
fprintf
(
header
,
"/*** %s methods ***/
\n
"
,
iface
->
name
);
fprintf
(
header
,
"/*** %s methods ***/
\n
"
,
iface
->
name
);
while
(
cur
)
{
while
(
cur
)
{
var_t
*
def
=
cur
->
def
;
const
var_t
*
def
=
cur
->
def
;
if
(
!
is_callas
(
def
->
attrs
))
{
if
(
!
is_callas
(
def
->
attrs
))
{
indent
(
header
,
0
);
indent
(
header
,
0
);
write_type
(
header
,
def
->
type
,
def
,
def
->
tname
);
write_type
(
header
,
def
->
type
,
def
,
def
->
tname
);
...
@@ -692,14 +692,14 @@ static void write_c_disp_method_def(const type_t *iface)
...
@@ -692,14 +692,14 @@ static void write_c_disp_method_def(const type_t *iface)
static
void
write_method_proto
(
const
type_t
*
iface
)
static
void
write_method_proto
(
const
type_t
*
iface
)
{
{
func_t
*
cur
=
iface
->
funcs
;
const
func_t
*
cur
=
iface
->
funcs
;
if
(
!
cur
)
return
;
if
(
!
cur
)
return
;
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
cur
)
{
while
(
cur
)
{
var_t
*
def
=
cur
->
def
;
const
var_t
*
def
=
cur
->
def
;
var_t
*
cas
=
is_callas
(
def
->
attrs
);
const
var_t
*
cas
=
is_callas
(
def
->
attrs
);
var_t
*
args
;
const
var_t
*
args
;
if
(
!
is_local
(
def
->
attrs
))
{
if
(
!
is_local
(
def
->
attrs
))
{
/* proxy prototype */
/* proxy prototype */
write_type
(
header
,
def
->
type
,
def
,
def
->
tname
);
write_type
(
header
,
def
->
type
,
def
,
def
->
tname
);
...
@@ -725,11 +725,11 @@ static void write_method_proto(const type_t *iface)
...
@@ -725,11 +725,11 @@ static void write_method_proto(const type_t *iface)
check_for_user_types
(
args
);
check_for_user_types
(
args
);
}
}
if
(
cas
)
{
if
(
cas
)
{
func_t
*
m
=
iface
->
funcs
;
const
func_t
*
m
=
iface
->
funcs
;
while
(
m
&&
strcmp
(
get_name
(
m
->
def
),
cas
->
name
))
while
(
m
&&
strcmp
(
get_name
(
m
->
def
),
cas
->
name
))
m
=
NEXT_LINK
(
m
);
m
=
NEXT_LINK
(
m
);
if
(
m
)
{
if
(
m
)
{
var_t
*
mdef
=
m
->
def
;
const
var_t
*
mdef
=
m
->
def
;
/* proxy prototype - use local prototype */
/* proxy prototype - use local prototype */
write_type
(
header
,
mdef
->
type
,
mdef
,
mdef
->
tname
);
write_type
(
header
,
mdef
->
type
,
mdef
,
mdef
->
tname
);
fprintf
(
header
,
" CALLBACK %s_"
,
iface
->
name
);
fprintf
(
header
,
" CALLBACK %s_"
,
iface
->
name
);
...
@@ -756,9 +756,9 @@ static void write_method_proto(const type_t *iface)
...
@@ -756,9 +756,9 @@ static void write_method_proto(const type_t *iface)
static
void
write_function_proto
(
const
type_t
*
iface
)
static
void
write_function_proto
(
const
type_t
*
iface
)
{
{
char
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
c
onst
c
har
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
int
explicit_handle
=
is_attr
(
iface
->
attrs
,
ATTR_EXPLICIT_HANDLE
);
int
explicit_handle
=
is_attr
(
iface
->
attrs
,
ATTR_EXPLICIT_HANDLE
);
var_t
*
explicit_handle_var
;
const
var_t
*
explicit_handle_var
;
func_t
*
cur
=
iface
->
funcs
;
func_t
*
cur
=
iface
->
funcs
;
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
while
(
NEXT_LINK
(
cur
))
cur
=
NEXT_LINK
(
cur
);
...
@@ -813,19 +813,19 @@ void write_forward(type_t *iface)
...
@@ -813,19 +813,19 @@ void write_forward(type_t *iface)
static
void
write_iface_guid
(
const
type_t
*
iface
)
static
void
write_iface_guid
(
const
type_t
*
iface
)
{
{
UUID
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
UUID
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
write_guid
(
"IID"
,
iface
->
name
,
uuid
);
write_guid
(
"IID"
,
iface
->
name
,
uuid
);
}
}
static
void
write_dispiface_guid
(
const
type_t
*
iface
)
static
void
write_dispiface_guid
(
const
type_t
*
iface
)
{
{
UUID
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
const
UUID
*
uuid
=
get_attrp
(
iface
->
attrs
,
ATTR_UUID
);
write_guid
(
"DIID"
,
iface
->
name
,
uuid
);
write_guid
(
"DIID"
,
iface
->
name
,
uuid
);
}
}
static
void
write_coclass_guid
(
class_t
*
cocl
)
static
void
write_coclass_guid
(
class_t
*
cocl
)
{
{
UUID
*
uuid
=
get_attrp
(
cocl
->
attrs
,
ATTR_UUID
);
const
UUID
*
uuid
=
get_attrp
(
cocl
->
attrs
,
ATTR_UUID
);
write_guid
(
"CLSID"
,
cocl
->
name
,
uuid
);
write_guid
(
"CLSID"
,
cocl
->
name
,
uuid
);
}
}
...
...
tools/widl/widltypes.h
View file @
511463f3
...
@@ -206,7 +206,7 @@ struct _var_t {
...
@@ -206,7 +206,7 @@ struct _var_t {
expr_t
*
array
;
expr_t
*
array
;
type_t
*
type
;
type_t
*
type
;
var_t
*
args
;
/* for function pointers */
var_t
*
args
;
/* for function pointers */
char
*
tname
;
c
onst
c
har
*
tname
;
attr_t
*
attrs
;
attr_t
*
attrs
;
expr_t
*
eval
;
expr_t
*
eval
;
long
lval
;
long
lval
;
...
...
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