Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
a644bad2
Commit
a644bad2
authored
12 years ago
by
Nikolay Sivov
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msxml3: Store handler pointers so casts to particular type are avoided.
parent
bd42c041
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msxml3/saxreader.c
+19
-9
19 additions, 9 deletions
dlls/msxml3/saxreader.c
with
19 additions
and
9 deletions
dlls/msxml3/saxreader.c
+
19
−
9
View file @
a644bad2
...
...
@@ -173,7 +173,7 @@ enum saxhandler_type
SAXHandler_Last
};
struct
saxhandler_iface
struct
sax
any
handler_iface
{
IUnknown
*
handler
;
IUnknown
*
vbhandler
;
...
...
@@ -197,6 +197,16 @@ struct saxlexicalhandler_iface
IVBSAXLexicalHandler
*
vbhandler
;
};
struct
saxhandler_iface
{
union
{
struct
saxcontenthandler_iface
content
;
struct
saxerrorhandler_iface
error
;
struct
saxlexicalhandler_iface
lexical
;
struct
saxanyhandler_iface
anyhandler
;
}
u
;
};
typedef
struct
{
DispatchEx
dispex
;
...
...
@@ -215,7 +225,7 @@ typedef struct
static
HRESULT
saxreader_put_handler
(
saxreader
*
reader
,
enum
saxhandler_type
type
,
void
*
ptr
,
BOOL
vb
)
{
struct
saxhandler_iface
*
iface
=
&
reader
->
saxhandlers
[
type
];
struct
sax
any
handler_iface
*
iface
=
&
reader
->
saxhandlers
[
type
]
.
u
.
anyhandler
;
IUnknown
*
unk
=
(
IUnknown
*
)
ptr
;
if
(
unk
)
...
...
@@ -234,7 +244,7 @@ static HRESULT saxreader_put_handler(saxreader *reader, enum saxhandler_type typ
static
HRESULT
saxreader_get_handler
(
const
saxreader
*
reader
,
enum
saxhandler_type
type
,
BOOL
vb
,
void
**
ret
)
{
const
struct
saxhandler_iface
*
iface
=
&
reader
->
saxhandlers
[
type
];
const
struct
sax
any
handler_iface
*
iface
=
&
reader
->
saxhandlers
[
type
]
.
u
.
anyhandler
;
if
(
!
ret
)
return
E_POINTER
;
...
...
@@ -253,17 +263,17 @@ static HRESULT saxreader_get_handler(const saxreader *reader, enum saxhandler_ty
static
struct
saxcontenthandler_iface
*
saxreader_get_contenthandler
(
saxreader
*
reader
)
{
return
(
struct
saxcontenthandler_iface
*
)
&
reader
->
saxhandlers
[
SAXContentHandler
];
return
&
reader
->
saxhandlers
[
SAXContentHandler
]
.
u
.
content
;
}
static
struct
saxerrorhandler_iface
*
saxreader_get_errorhandler
(
saxreader
*
reader
)
{
return
(
struct
saxerrorhandler_iface
*
)
&
reader
->
saxhandlers
[
SAXErrorHandler
];
return
&
reader
->
saxhandlers
[
SAXErrorHandler
]
.
u
.
error
;
}
static
struct
saxlexicalhandler_iface
*
saxreader_get_lexicalhandler
(
saxreader
*
reader
)
{
return
(
struct
saxlexicalhandler_iface
*
)
&
reader
->
saxhandlers
[
SAXLexicalHandler
];
return
&
reader
->
saxhandlers
[
SAXLexicalHandler
]
.
u
.
lexical
;
}
typedef
struct
...
...
@@ -327,8 +337,8 @@ static inline saxlocator *impl_from_ISAXAttributes( ISAXAttributes *iface )
static
inline
int
saxreader_has_handler
(
const
saxlocator
*
locator
,
enum
saxhandler_type
type
)
{
return
(
locator
->
vbInterface
&&
locator
->
saxreader
->
saxhandlers
[
type
].
vb
handler
)
||
(
!
locator
->
vbInterface
&&
locator
->
saxreader
->
saxhandlers
[
type
].
handler
);
struct
saxanyhandler_iface
*
iface
=
&
locator
->
saxreader
->
saxhandlers
[
type
].
u
.
any
handler
;
return
(
locator
->
vbInterface
&&
iface
->
vbhandler
)
||
(
!
locator
->
vbInterface
&&
iface
->
handler
);
}
/* property names */
...
...
@@ -2734,7 +2744,7 @@ static ULONG WINAPI saxxmlreader_Release(
for
(
i
=
0
;
i
<
SAXHandler_Last
;
i
++
)
{
struct
saxhandler_iface
*
iface
=
&
This
->
saxhandlers
[
i
];
struct
sax
any
handler_iface
*
iface
=
&
This
->
saxhandlers
[
i
]
.
u
.
anyhandler
;
if
(
iface
->
handler
)
IUnknown_Release
(
iface
->
handler
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment