Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
981dc062
Commit
981dc062
authored
Jan 07, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/expat/ExpatParser: add constructor overload for XML_ParserCreateNS()
parent
8986d14e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
ExpatParser.hxx
src/lib/expat/ExpatParser.hxx
+15
-0
No files found.
src/lib/expat/ExpatParser.hxx
View file @
981dc062
...
...
@@ -38,6 +38,10 @@ public:
:
ExpatError
(
XML_GetErrorCode
(
parser
))
{}
};
struct
ExpatNamespaceSeparator
{
char
separator
;
};
class
ExpatParser
final
{
const
XML_Parser
parser
;
...
...
@@ -47,6 +51,11 @@ public:
XML_SetUserData
(
parser
,
userData
);
}
ExpatParser
(
ExpatNamespaceSeparator
ns
,
void
*
userData
)
:
parser
(
XML_ParserCreateNS
(
nullptr
,
ns
.
separator
))
{
XML_SetUserData
(
parser
,
userData
);
}
~
ExpatParser
()
{
XML_ParserFree
(
parser
);
}
...
...
@@ -89,6 +98,12 @@ public:
parser
.
SetCharacterDataHandler
(
CharacterData
);
}
explicit
CommonExpatParser
(
ExpatNamespaceSeparator
ns
)
:
parser
(
ns
,
this
)
{
parser
.
SetElementHandler
(
StartElement
,
EndElement
);
parser
.
SetCharacterDataHandler
(
CharacterData
);
}
void
Parse
(
const
char
*
data
,
size_t
length
,
bool
is_final
)
{
parser
.
Parse
(
data
,
length
,
is_final
);
}
...
...
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