Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libxml2-python3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
libxml2-python3
Commits
ac980b23
Commit
ac980b23
authored
Jun 27, 2023
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patched to work with newer Python 3
parent
f783ee6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
0 deletions
+71
-0
Makefile
Makefile
+1
-0
libxml2-python3-2.9.5-fix_python_type_checks.patch
libxml2-python3-2.9.5-fix_python_type_checks.patch
+70
-0
No files found.
Makefile
View file @
ac980b23
all
:
all
:
tar
xf libxml2-python3-2.9.5.tar.gz
tar
xf libxml2-python3-2.9.5.tar.gz
patch
-Np1
-d
libxml2-python3-2.9.5 < libxml2-python3-2.9.5-fix_python_type_checks.patch
# cd libxml2-python3-2.9.5 && python3 setup.py build
# cd libxml2-python3-2.9.5 && python3 setup.py build
cd
libxml2-python3-2.9.5
&&
python3
setup.py
install
--optimize
=
1
cd
libxml2-python3-2.9.5
&&
python3
setup.py
install
--optimize
=
1
rm
-rf
libxml2-python3-2.9.5
rm
-rf
libxml2-python3-2.9.5
libxml2-python3-2.9.5-fix_python_type_checks.patch
0 → 100644
View file @
ac980b23
diff -uNr libxml2-python3-2.9.5/libxml.c libxml2-python3-2.9.5-fix_python_type_checks/libxml.c
--- libxml2-python3-2.9.5/libxml.c 2018-05-16 04:19:18.000000000 +0930
+++ libxml2-python3-2.9.5-fix_python_type_checks/libxml.c 2022-10-25 08:51:32.147262594 +1030
@@ -294,7 +294,7 @@
lenread = PyBytes_Size(ret);
data = PyBytes_AsString(ret);
#ifdef PyUnicode_Check
- } else if PyUnicode_Check (ret) {
+ } else if (PyUnicode_Check(ret)) {
#if PY_VERSION_HEX >= 0x03030000
Py_ssize_t size;
const char *tmp;
@@ -359,7 +359,7 @@
lenread = PyBytes_Size(ret);
data = PyBytes_AsString(ret);
#ifdef PyUnicode_Check
- } else if PyUnicode_Check (ret) {
+ } else if (PyUnicode_Check(ret)) {
#if PY_VERSION_HEX >= 0x03030000
Py_ssize_t size;
const char *tmp;
diff -uNr libxml2-python3-2.9.5/types.c libxml2-python3-2.9.5-fix_python_type_checks/types.c
--- libxml2-python3-2.9.5/types.c 2018-05-16 04:19:18.000000000 +0930
+++ libxml2-python3-2.9.5-fix_python_type_checks/types.c 2022-10-25 08:53:13.458560697 +1030
@@ -602,16 +602,16 @@
if (obj == NULL) {
return (NULL);
}
- if PyFloat_Check (obj) {
+ if (PyFloat_Check(obj)) {
ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
- } else if PyLong_Check(obj) {
+ } else if (PyLong_Check(obj)) {
#ifdef PyLong_AS_LONG
ret = xmlXPathNewFloat((double) PyLong_AS_LONG(obj));
#else
ret = xmlXPathNewFloat((double) PyInt_AS_LONG(obj));
#endif
#ifdef PyBool_Check
- } else if PyBool_Check (obj) {
+ } else if (PyBool_Check(obj)) {
if (obj == Py_True) {
ret = xmlXPathNewBoolean(1);
@@ -620,14 +620,14 @@
ret = xmlXPathNewBoolean(0);
}
#endif
- } else if PyBytes_Check (obj) {
+ } else if (PyBytes_Check(obj)) {
xmlChar *str;
str = xmlStrndup((const xmlChar *) PyBytes_AS_STRING(obj),
PyBytes_GET_SIZE(obj));
ret = xmlXPathWrapString(str);
#ifdef PyUnicode_Check
- } else if PyUnicode_Check (obj) {
+ } else if (PyUnicode_Check(obj)) {
#if PY_VERSION_HEX >= 0x03030000
xmlChar *str;
const char *tmp;
@@ -650,7 +650,7 @@
ret = xmlXPathWrapString(str);
#endif
#endif
- } else if PyList_Check (obj) {
+ } else if (PyList_Check(obj)) {
int i;
PyObject *node;
xmlNodePtr cur;
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