Last active
January 2, 2022 00:59
-
-
Save ipatch/f446e76db6551622a07c9bee4e920d83 to your computer and use it in GitHub Desktop.
homebrew-freecad patches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 524c4321dd5b155bf19727de40a89935c0723739 Mon Sep 17 00:00:00 2001 | |
From: chris <[email protected]> | |
Date: Sat, 1 Jan 2022 16:43:16 -0600 | |
Subject: [PATCH] exp with patch from upstream pyside project | |
--- | |
sources/shiboken2/tests/samplebinding/typesystem_sample.xml | 2 ++ | |
1 file changed, 2 insertions(+) | |
diff --git a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml | |
index 595afb9ae..46b2a1e38 100644 | |
--- a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml | |
+++ b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml | |
@@ -1953,6 +1953,7 @@ | |
%PYARG_0 = Py_False; | |
else | |
%PYARG_0 = Py_True; | |
+ Py_INCREF(%PYARG_0); | |
} | |
</inject-code> | |
</add-function> | |
@@ -1970,6 +1971,7 @@ | |
%PYARG_0 = Py_True; | |
else | |
%PYARG_0 = Py_False; | |
+ Py_INCREF(%PYARG_0); | |
} | |
</inject-code> | |
</add-function> | |
-- | |
2.34.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 862ea63ff892bd0e5a084981bf501dbfe454a901 Mon Sep 17 00:00:00 2001 | |
From: chris <[email protected]> | |
Date: Sat, 1 Jan 2022 18:57:26 -0600 | |
Subject: [PATCH] ipatch, backport shiboken6 feature | |
--- | |
sources/shiboken2/libshiboken/pep384impl.cpp | 16 +++++++++------- | |
1 file changed, 9 insertions(+), 7 deletions(-) | |
diff --git a/sources/shiboken2/libshiboken/pep384impl.cpp b/sources/shiboken2/libshiboken/pep384impl.cpp | |
index cb8042561..ae009c7ed 100644 | |
--- a/sources/shiboken2/libshiboken/pep384impl.cpp | |
+++ b/sources/shiboken2/libshiboken/pep384impl.cpp | |
@@ -751,14 +751,17 @@ _Pep_PrivateMangle(PyObject *self, PyObject *name) | |
#endif // IS_PY2 | |
Shiboken::AutoDecRef privateobj(PyObject_GetAttr( | |
reinterpret_cast<PyObject *>(Py_TYPE(self)), Shiboken::PyMagicName::name())); | |
-#ifndef Py_LIMITED_API | |
- return _Py_Mangle(privateobj, name); | |
-#else | |
- // For some reason, _Py_Mangle is not in the Limited API. Why? | |
- size_t plen = PyUnicode_GET_LENGTH(privateobj); | |
+ | |
+ // NOTE: ipatch, backported from shiboken6 | |
+ // NOTE: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/shiboken6/libshiboken/pep384impl.cpp | |
+ | |
+ // PYSIDE-1436: _Py_Mangle is no longer exposed; implement it always. | |
+ // The rest of this function is our own implementation of _Py_Mangle. | |
+ // Please compare the original function in compile.c . | |
+ size_t plen = PyUnicode_GET_LENGTH(privateobj.object()); | |
/* Strip leading underscores from class name */ | |
size_t ipriv = 0; | |
- while (PyUnicode_READ_CHAR(privateobj, ipriv) == '_') | |
+ while (PyUnicode_READ_CHAR(privateobj.object(), ipriv) == '_') | |
ipriv++; | |
if (ipriv == plen) { | |
Py_INCREF(name); | |
@@ -787,7 +790,6 @@ _Pep_PrivateMangle(PyObject *self, PyObject *name) | |
if (amount > big_stack) | |
free(resbuf); | |
return result; | |
-#endif // else Py_LIMITED_API | |
} | |
/***************************************************************************** | |
-- | |
2.34.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment