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
 
 
