parent
e471d49e64
commit
0fa34c0704
@ -1,12 +0,0 @@
|
||||
diff -up Inline-Python-0.56/Makefile.PL.orig Inline-Python-0.56/Makefile.PL
|
||||
--- Inline-Python-0.56/Makefile.PL.orig 2018-07-09 12:54:47.605495856 +0200
|
||||
+++ Inline-Python-0.56/Makefile.PL 2018-07-09 12:55:15.919418183 +0200
|
||||
@@ -22,7 +22,7 @@ unless ($sel) {
|
||||
my $sep = $^O eq 'MSWin32' ? ";" : ":";
|
||||
for $p (split /$sep/, $ENV{PATH}) {
|
||||
$p =~ s/^~/$ENV{HOME}/;
|
||||
- $p .= "/python";
|
||||
+ $p .= "/python3";
|
||||
next unless -f $p and -x $p;
|
||||
next if $pythons{abs_path($p)}++; # filter symlinked duplicates
|
||||
push @pythons, { path => $p };
|
@ -0,0 +1,47 @@
|
||||
From 90b68bdf370c07b1d3fdd46bbdf1b154ed74b91b Mon Sep 17 00:00:00 2001
|
||||
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
||||
Date: Wed, 18 Aug 2021 16:41:10 +0200
|
||||
Subject: [PATCH] Call Py_Initialize() before calling PyBytes_FromString()
|
||||
|
||||
Not doing this gives a segmentation fault with Python 3.10
|
||||
---
|
||||
Python.xs | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Python.xs b/Python.xs
|
||||
index 11d5033..7a3c793 100644
|
||||
--- a/Python.xs
|
||||
+++ b/Python.xs
|
||||
@@ -25,14 +25,6 @@ void do_pyinit() {
|
||||
#ifdef EXPOSE_PERL
|
||||
PyObject *main_dict;
|
||||
PyObject *perl_obj;
|
||||
-
|
||||
-#if PY_MAJOR_VERSION >= 3
|
||||
- PyObject *dummy1 = PyBytes_FromString(""),
|
||||
- *dummy2 = PyBytes_FromString("main");
|
||||
-#else
|
||||
- PyObject *dummy1 = PyString_FromString(""),
|
||||
- *dummy2 = PyString_FromString("main");
|
||||
-#endif
|
||||
#endif
|
||||
/* sometimes Python needs to know about argc and argv to be happy */
|
||||
int _python_argc = 1;
|
||||
@@ -48,6 +40,14 @@ void do_pyinit() {
|
||||
PySys_SetArgv(_python_argc, _python_argv); /* Tk needs this */
|
||||
|
||||
#ifdef EXPOSE_PERL
|
||||
+#if PY_MAJOR_VERSION >= 3
|
||||
+ PyObject *dummy1 = PyBytes_FromString(""),
|
||||
+ *dummy2 = PyBytes_FromString("main");
|
||||
+#else
|
||||
+ PyObject *dummy1 = PyString_FromString(""),
|
||||
+ *dummy2 = PyString_FromString("main");
|
||||
+#endif
|
||||
+
|
||||
/* create the perl module and add functions */
|
||||
initperl();
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
Loading…
Reference in new issue