--- a/python3/gplugin-python3-loader.c Tue Sep 28 02:59:16 2021 -0500
+++ b/python3/gplugin-python3-loader.c Wed Sep 29 16:12:22 2021 -0500
@@ -15,13 +15,13 @@
* License along with this library; if not, see <https://www.gnu.org/licenses/>.
-#include "gplugin-python3-loader.h"
+#define PY_SSIZE_T_CLEAN
+#include "gplugin-python3-loader.h" #include <glib/gi18n-lib.h>
#include "gplugin-python3-plugin.h"
@@ -29,9 +29,6 @@
struct _GPluginPython3Loader {
- PyThreadState *py_thread_state;
--- a/python3/gplugin-python3-plugin.c Tue Sep 28 02:59:16 2021 -0500
+++ b/python3/gplugin-python3-plugin.c Wed Sep 29 16:12:22 2021 -0500
@@ -15,9 +15,10 @@
* License along with this library; if not, see <https://www.gnu.org/licenses/>.
-#include "gplugin-python3-plugin.h"
+#define PY_SSIZE_T_CLEAN
+#include "gplugin-python3-plugin.h" /******************************************************************************
@@ -26,7 +27,6 @@
--- a/python3/gplugin-python3-test-pygobject.c Tue Sep 28 02:59:16 2021 -0500
+++ b/python3/gplugin-python3-test-pygobject.c Wed Sep 29 16:12:22 2021 -0500
@@ -15,11 +15,11 @@
* License along with this library; if not, see <https://www.gnu.org/licenses/>.
+#define PY_SSIZE_T_CLEAN
--- a/python3/gplugin-python3-utils.c Tue Sep 28 02:59:16 2021 -0500
+++ b/python3/gplugin-python3-utils.c Wed Sep 29 16:12:22 2021 -0500
@@ -15,14 +15,13 @@
* License along with this library; if not, see <https://www.gnu.org/licenses/>.
+#define PY_SSIZE_T_CLEAN #include "gplugin-python3-utils.h"
gplugin_python3_filename_to_module(const gchar *filename)
@@ -35,15 +34,13 @@
base = g_path_get_basename(filename);
/* now find the last . for the extension */
- e = g_utf8_strrchr(base, g_utf8_strlen(base, -1), g_utf8_get_char("."));
+ e = g_utf8_strrchr(base, -1, g_utf8_get_char(".")); /* now copy the module name into r */
- r = g_malloc(e - base + 1);
- memcpy(r, base, e - base);
+ r = g_strndup(base, e - base); --- a/python3/tests/test-python3-utils.c Tue Sep 28 02:59:16 2021 -0500
+++ b/python3/tests/test-python3-utils.c Wed Sep 29 16:12:22 2021 -0500
@@ -15,9 +15,10 @@
* License along with this library; if not, see <https://www.gnu.org/licenses/>.
+#define PY_SSIZE_T_CLEAN
#include "gplugin-python3-utils.h"