40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From fc0c89940e80ac52bbc9d3f5cdbb72c94bc25ad2 Mon Sep 17 00:00:00 2001
|
|
From: zhangxianting <zhangxianting@uniontech.com>
|
|
Date: Thu, 11 Apr 2024 02:00:53 +0800
|
|
Subject: [PATCH] fix build error :assign const _xmlError * value to _xmlError
|
|
|
|
---
|
|
xml2/src/xml2_init.cpp | 2 +-
|
|
xml2/src/xml2_schema.cpp | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/xml2/src/xml2_init.cpp b/xml2/src/xml2_init.cpp
|
|
index b89c64a..0ff2782 100644
|
|
--- a/xml2/src/xml2_init.cpp
|
|
+++ b/xml2/src/xml2_init.cpp
|
|
@@ -43,7 +43,7 @@ extern "C" SEXP init_libxml2() {
|
|
LIBXML_TEST_VERSION
|
|
|
|
xmlInitParser();
|
|
- xmlSetStructuredErrorFunc(NULL, handleStructuredError);
|
|
+ xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc)handleStructuredError);
|
|
xmlSetGenericErrorFunc(NULL, handleGenericError);
|
|
|
|
return R_NilValue;
|
|
diff --git a/xml2/src/xml2_schema.cpp b/xml2/src/xml2_schema.cpp
|
|
index dfe37e5..fe6fa9a 100644
|
|
--- a/xml2/src/xml2_schema.cpp
|
|
+++ b/xml2/src/xml2_schema.cpp
|
|
@@ -6,7 +6,7 @@
|
|
#include <string>
|
|
#include "xml2_utils.h"
|
|
|
|
-void handleSchemaError(void* userData, xmlError* error) {
|
|
+void handleSchemaError(void* userData, const xmlError* error) {
|
|
std::vector<std::string> * vec = (std::vector<std::string> *) userData;
|
|
std::string message = std::string(error->message);
|
|
message.resize(message.size() - 1);
|
|
--
|
|
2.33.0
|
|
|