Commit 056e3310 authored by Mark Florisson's avatar Mark Florisson

Fix py32 compatibility & fix warnings

parent 31b2f495
...@@ -1460,7 +1460,8 @@ class FuncDefNode(StatNode, BlockNode): ...@@ -1460,7 +1460,8 @@ class FuncDefNode(StatNode, BlockNode):
if self.return_type.is_pyobject: if self.return_type.is_pyobject:
init = " = NULL" init = " = NULL"
elif self.return_type.is_memoryviewslice: elif self.return_type.is_memoryviewslice:
init = "= {0, 0}" import MemoryView
init = ' = ' + MemoryView.memslice_entry_init
code.putln( code.putln(
"%s%s;" % "%s%s;" %
......
...@@ -1115,12 +1115,12 @@ cdef int _err_extents(int i, Py_ssize_t extent1, ...@@ -1115,12 +1115,12 @@ cdef int _err_extents(int i, Py_ssize_t extent1,
@cname('__pyx_memoryview_err_dim') @cname('__pyx_memoryview_err_dim')
cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
raise error(msg % dim) raise error(msg.decode('ascii') % dim)
@cname('__pyx_memoryview_err') @cname('__pyx_memoryview_err')
cdef int _err(object error, char *msg) except -1 with gil: cdef int _err(object error, char *msg) except -1 with gil:
if msg != NULL: if msg != NULL:
raise error(msg) raise error(msg.decode('ascii'))
else: else:
raise error raise error
......
...@@ -385,7 +385,7 @@ static CYTHON_INLINE void __pyx_fatalerror(const char *fmt, ...) { ...@@ -385,7 +385,7 @@ static CYTHON_INLINE void __pyx_fatalerror(const char *fmt, ...) {
va_end(vargs); va_end(vargs);
} }
static int CYTHON_INLINE static CYTHON_INLINE int
__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count, __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
PyThread_type_lock lock) PyThread_type_lock lock)
{ {
...@@ -396,7 +396,7 @@ __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count, ...@@ -396,7 +396,7 @@ __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
return result; return result;
} }
static int CYTHON_INLINE static CYTHON_INLINE int
__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count, __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
PyThread_type_lock lock) PyThread_type_lock lock)
{ {
...@@ -408,8 +408,9 @@ __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count, ...@@ -408,8 +408,9 @@ __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
} }
static CYTHON_INLINE void __Pyx_INC_MEMVIEW({{memviewslice_name}} *memslice, static CYTHON_INLINE void
int have_gil, int lineno) { __Pyx_INC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil, int lineno)
{
int first_time; int first_time;
struct {{memview_struct_name}} *memview = memslice->memview; struct {{memview_struct_name}} *memview = memslice->memview;
if (!memview) if (!memview)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment