Skip to content

Commit 497971c

Browse files
committed
Remove PyXmlSec_CheckLibXmlLibraryVersion check
1 parent ee9fbd0 commit 497971c

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/lxml.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,6 @@ long PyXmlSec_GetLibXmlCompiledVersionPatch() {
4747
return XMLSEC_EXTRACT_PATCH(LIBXML_VERSION);
4848
}
4949

50-
static int PyXmlSec_CheckLibXmlLibraryVersion(void) {
51-
// Make sure that the version of libxml2 that we were compiled against is the same as the one
52-
// that is loaded. If there is a version mismatch, we could run into segfaults.
53-
54-
if (PyXmlSec_GetLibXmlVersionMajor() != PyXmlSec_GetLibXmlCompiledVersionMajor() ||
55-
PyXmlSec_GetLibXmlVersionMinor() != PyXmlSec_GetLibXmlCompiledVersionMinor()) {
56-
return -1;
57-
}
58-
59-
return 0;
60-
}
61-
6250
static int PyXmlSec_CheckLxmlLibraryVersion(void) {
6351
// Make sure that the version of libxml2 lxml is using is the same as the one we are using. Because
6452
// we pass trees between the two libraries, we need to make sure that they are using the same version
@@ -104,11 +92,6 @@ static int PyXmlSec_CheckLxmlLibraryVersion(void) {
10492
}
10593

10694
int PyXmlSec_InitLxmlModule(void) {
107-
if (PyXmlSec_CheckLibXmlLibraryVersion() < 0) {
108-
PyXmlSec_SetLastError("xmlsec libxml2 library compiled version vs runtime version mismatch");
109-
return -1;
110-
}
111-
11295
if (PyXmlSec_CheckLxmlLibraryVersion() < 0) {
11396
PyXmlSec_SetLastError("lxml & xmlsec libxml2 library version mismatch");
11497
return -1;

0 commit comments

Comments
 (0)