mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-15 00:38:15 +00:00
tests/runtests.c: Re-apply 883115d0a3
and c094e450a1
This effectively reverts commit 42dc2c2c4e
.
This commit is contained in:
parent
014a303dc1
commit
17367a5642
3 changed files with 5 additions and 5 deletions
|
@ -2569,7 +2569,7 @@ START_TEST(test_ext_entity_ref_parameter) {
|
|||
* what NULL would cause to be passed.
|
||||
*/
|
||||
XML_SetExternalEntityRefHandlerArg(g_parser, (void *)text);
|
||||
g_handler_data = (void *)text;
|
||||
g_handler_data = text;
|
||||
if (_XML_Parse_SINGLE_BYTES(g_parser, text, (int)strlen(text), XML_TRUE)
|
||||
== XML_STATUS_ERROR)
|
||||
xml_failure(g_parser);
|
||||
|
@ -2579,7 +2579,7 @@ START_TEST(test_ext_entity_ref_parameter) {
|
|||
XML_SetParamEntityParsing(g_parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
|
||||
XML_SetExternalEntityRefHandler(g_parser, external_entity_ref_param_checker);
|
||||
XML_SetExternalEntityRefHandlerArg(g_parser, NULL);
|
||||
g_handler_data = (void *)g_parser;
|
||||
g_handler_data = g_parser;
|
||||
if (_XML_Parse_SINGLE_BYTES(g_parser, text, (int)strlen(text), XML_TRUE)
|
||||
== XML_STATUS_ERROR)
|
||||
xml_failure(g_parser);
|
||||
|
@ -4889,10 +4889,10 @@ START_TEST(test_nested_entity_suspend) {
|
|||
const XML_Char *const expected = XCS("start") XCS("e3 head") XCS("e2 head")
|
||||
XCS("e1") XCS("e2 tail") XCS("e3 tail") XCS("end");
|
||||
CharData storage;
|
||||
CharData_Init(&storage);
|
||||
XML_Parser parser = XML_ParserCreate(NULL);
|
||||
ParserPlusStorage parserPlusStorage = {parser, &storage};
|
||||
|
||||
CharData_Init(&storage);
|
||||
XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS);
|
||||
XML_SetCommentHandler(parser, accumulate_and_suspend_comment_handler);
|
||||
XML_SetUserData(parser, &parserPlusStorage);
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
/* Global variables for user parameter settings tests */
|
||||
/* Variable holding the expected handler userData */
|
||||
void *g_handler_data = NULL;
|
||||
const void *g_handler_data = NULL;
|
||||
/* Count of the number of times the comment handler has been invoked */
|
||||
int g_comment_count = 0;
|
||||
/* Count of the number of skipped entities */
|
||||
|
|
|
@ -50,7 +50,7 @@ extern "C" {
|
|||
# include "expat.h"
|
||||
|
||||
/* Variable holding the expected handler userData */
|
||||
extern void *g_handler_data;
|
||||
extern const void *g_handler_data;
|
||||
/* Count of the number of times the comment handler has been invoked */
|
||||
extern int g_comment_count;
|
||||
/* Count of the number of skipped entities */
|
||||
|
|
Loading…
Add table
Reference in a new issue