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
491ec41f
Commit
491ec41f
authored
Oct 20, 2010
by
Adam Martinson
Committed by
Alexandre Julliard
Oct 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Implement schema_cache_addCollection().
parent
eac6ed01
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
4 deletions
+40
-4
schema.c
dlls/msxml3/schema.c
+23
-2
schema.c
dlls/msxml3/tests/schema.c
+17
-2
No files found.
dlls/msxml3/schema.c
View file @
491ec41f
...
...
@@ -474,10 +474,31 @@ static HRESULT WINAPI schema_cache_get_namespaceURI(IXMLDOMSchemaCollection *ifa
return
E_NOTIMPL
;
}
static
void
cache_copy
(
void
*
data
,
void
*
dest
,
xmlChar
*
name
)
{
schema_cache
*
This
=
(
schema_cache
*
)
dest
;
cache_entry
*
entry
=
(
cache_entry
*
)
data
;
if
(
xmlHashLookup
(
This
->
cache
,
name
)
==
NULL
)
{
cache_entry_add_ref
(
entry
);
xmlHashAddEntry
(
This
->
cache
,
name
,
entry
);
}
}
static
HRESULT
WINAPI
schema_cache_addCollection
(
IXMLDOMSchemaCollection
*
iface
,
IXMLDOMSchemaCollection
*
otherCollection
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
schema_cache
*
This
=
impl_from_IXMLDOMSchemaCollection
(
iface
);
schema_cache
*
That
=
impl_from_IXMLDOMSchemaCollection
(
otherCollection
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
That
);
if
(
!
otherCollection
)
return
E_POINTER
;
/* TODO: detect errors while copying & return E_FAIL */
xmlHashScan
(
That
->
cache
,
cache_copy
,
This
);
return
S_OK
;
}
static
HRESULT
WINAPI
schema_cache_get__newEnum
(
IXMLDOMSchemaCollection
*
iface
,
IUnknown
**
ppUnk
)
...
...
dlls/msxml3/tests/schema.c
View file @
491ec41f
...
...
@@ -324,6 +324,7 @@ static void test_collection_refs(void)
IXMLDOMDocument2
*
schema1
,
*
schema2
,
*
schema3
;
IXMLDOMSchemaCollection
*
cache1
,
*
cache2
,
*
cache3
;
VARIANT_BOOL
b
;
LONG
length
;
schema1
=
create_document
(
&
IID_IXMLDOMDocument2
);
schema2
=
create_document
(
&
IID_IXMLDOMDocument2
);
...
...
@@ -376,8 +377,22 @@ static void test_collection_refs(void)
if
(
schema2
)
todo_wine
check_refs
(
IXMLDOMDocument2
,
schema2
,
1
);
if
(
schema3
)
todo_wine
check_refs
(
IXMLDOMDocument2
,
schema3
,
1
);
todo_wine
ole_check
(
IXMLDOMSchemaCollection_addCollection
(
cache2
,
cache1
));
todo_wine
ole_check
(
IXMLDOMSchemaCollection_addCollection
(
cache3
,
cache2
));
ole_expect
(
IXMLDOMSchemaCollection_addCollection
(
cache1
,
NULL
),
E_POINTER
);
ole_check
(
IXMLDOMSchemaCollection_addCollection
(
cache2
,
cache1
));
ole_check
(
IXMLDOMSchemaCollection_addCollection
(
cache3
,
cache2
));
length
=
-
1
;
ole_check
(
IXMLDOMSchemaCollection_get_length
(
cache1
,
&
length
));
ok
(
length
==
1
,
"expected length 1, got %i"
,
length
);
length
=
-
1
;
ole_check
(
IXMLDOMSchemaCollection_get_length
(
cache2
,
&
length
));
ok
(
length
==
2
,
"expected length 2, got %i"
,
length
);
length
=
-
1
;
ole_check
(
IXMLDOMSchemaCollection_get_length
(
cache3
,
&
length
));
ok
(
length
==
3
,
"expected length 3, got %i"
,
length
);
/* merging collections does not affect the ref count */
check_refs
(
IXMLDOMSchemaCollection
,
cache1
,
1
);
...
...
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