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
57aa75f7
Commit
57aa75f7
authored
Oct 16, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Fixed dynamic properties allocation.
parent
e7ff1019
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
dispex.c
dlls/msxml3/dispex.c
+27
-8
No files found.
dlls/msxml3/dispex.c
View file @
57aa75f7
...
...
@@ -436,18 +436,37 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
}
if
(
grfdex
&
fdexNameEnsure
)
{
dispex_dynamic_data_t
*
dynamic_data
;
TRACE
(
"creating dynamic prop %s
\n
"
,
debugstr_w
(
bstrName
));
if
(
!
This
->
dynamic_data
)
{
This
->
dynamic_data
=
heap_alloc_zero
(
sizeof
(
dispex_dynamic_data_t
));
This
->
dynamic_data
->
props
=
heap_alloc
(
This
->
dynamic_data
->
buf_size
=
4
);
}
else
if
(
This
->
dynamic_data
->
buf_size
==
This
->
dynamic_data
->
prop_cnt
)
{
This
->
dynamic_data
->
props
=
heap_realloc
(
This
->
dynamic_data
->
props
,
This
->
dynamic_data
->
buf_size
<<=
1
);
if
(
This
->
dynamic_data
)
{
dynamic_data
=
This
->
dynamic_data
;
}
else
{
dynamic_data
=
This
->
dynamic_data
=
heap_alloc_zero
(
sizeof
(
dispex_dynamic_data_t
));
if
(
!
dynamic_data
)
return
E_OUTOFMEMORY
;
}
if
(
!
dynamic_data
->
buf_size
)
{
dynamic_data
->
props
=
heap_alloc
(
sizeof
(
dynamic_prop_t
)
*
4
);
if
(
!
dynamic_data
->
props
)
return
E_OUTOFMEMORY
;
dynamic_data
->
buf_size
=
4
;
}
else
if
(
dynamic_data
->
buf_size
==
dynamic_data
->
prop_cnt
)
{
dynamic_prop_t
*
new_props
;
new_props
=
heap_realloc
(
dynamic_data
->
props
,
sizeof
(
dynamic_prop_t
)
*
(
dynamic_data
->
buf_size
<<
1
));
if
(
!
new_props
)
return
E_OUTOFMEMORY
;
dynamic_data
->
props
=
new_props
;
dynamic_data
->
buf_size
<<=
1
;
}
This
->
dynamic_data
->
props
[
This
->
dynamic_data
->
prop_cnt
].
name
=
heap_strdupW
(
bstrName
);
VariantInit
(
&
This
->
dynamic_data
->
props
[
This
->
dynamic_data
->
prop_cnt
].
var
);
*
pid
=
DISPID_DYNPROP_0
+
This
->
dynamic_data
->
prop_cnt
++
;
dynamic_data
->
props
[
dynamic_data
->
prop_cnt
].
name
=
heap_strdupW
(
bstrName
);
VariantInit
(
&
dynamic_data
->
props
[
dynamic_data
->
prop_cnt
].
var
);
*
pid
=
DISPID_DYNPROP_0
+
dynamic_data
->
prop_cnt
++
;
return
S_OK
;
}
...
...
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