861ac185a6
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
30 lines
984 B
Diff
30 lines
984 B
Diff
From 6198152e8708a36782d48bc9d3a5835b19be3330 Mon Sep 17 00:00:00 2001
|
|
From: Andrew Udvare <audvare@gmail.com>
|
|
Date: Tue, 22 May 2018 17:02:38 -0400
|
|
Subject: [PATCH] Fix for Python 3
|
|
|
|
---
|
|
cython/debugserver.pxi | 7 +++----
|
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
diff --git cython/debugserver.pxi cython/debugserver.pxi
|
|
index ddbe0667..42430113 100644
|
|
--- a/cython/debugserver.pxi
|
|
+++ b/cython/debugserver.pxi
|
|
@@ -43,14 +43,13 @@ cdef class DebugServerError(BaseError):
|
|
BaseError.__init__(self, *args, **kwargs)
|
|
|
|
|
|
-# from http://stackoverflow.com/a/17511714
|
|
-from cpython.string cimport PyString_AsString
|
|
+from cpython.bytes cimport PyBytes_AS_STRING
|
|
cdef char ** to_cstring_array(list_str):
|
|
if not list_str:
|
|
return NULL
|
|
cdef char **ret = <char **>malloc(len(list_str) * sizeof(char *))
|
|
for i in xrange(len(list_str)):
|
|
- ret[i] = PyString_AsString(list_str[i])
|
|
+ ret[i] = PyBytes_AS_STRING(list_str[i])
|
|
return ret
|
|
|
|
|