diff --git a/Cython/Compiler/Buffer.py b/Cython/Compiler/Buffer.py index 7b645aedd6b4ddc4a652a53f8560b58574c145d3..3782cb38354cd1b99580b7b1e54f64e38f1aca04 100644 --- a/Cython/Compiler/Buffer.py +++ b/Cython/Compiler/Buffer.py @@ -748,7 +748,7 @@ def get_type_information_cname(code, dtype, maxdepth=None): typeinfo = ('static __Pyx_TypeInfo %s = ' '{ "%s", %s, sizeof(%s), { %s }, %s, \'%s\', %s, %s };') tup = (name, rep, structinfo_name, declcode, - ', '.join([str(x) for x in arraysizes]), len(arraysizes), + ', '.join([str(x) for x in arraysizes]) or '0', len(arraysizes), typegroup, is_unsigned, flags) typecode.putln(typeinfo % tup, safe=True) diff --git a/Cython/Utility/MemoryView_C.c b/Cython/Utility/MemoryView_C.c index 493025e72b281b0bb1c47e72df683f8c456f77d2..219cc194b735780b7efd0afa18183e69215923c8 100644 --- a/Cython/Utility/MemoryView_C.c +++ b/Cython/Utility/MemoryView_C.c @@ -3,6 +3,8 @@ /* memoryview slice struct */ +struct {{memview_struct_name}}; + typedef struct { struct {{memview_struct_name}} *memview; char *data; @@ -48,6 +50,7 @@ typedef struct { #warning "Using Intel atomics" #endif #else + #undef CYTHON_ATOMICS #define CYTHON_ATOMICS 0 #ifdef __PYX_DEBUG_ATOMICS