buffer_aux.buffer_info_var.used = True
for s in buffer_aux.shapevars: s.used = True
for s in buffer_aux.stridevars: s.used = True
- for s in buffer_aux.suboffsetvars: s.used = True
+ if buffer_aux.suboffsetvars:
+ for s in buffer_aux.suboffsetvars: s.used = True
def put_unpack_buffer_aux_into_scope(buffer_aux, mode, code):
# Generate code to copy the needed struct info into local
self.type = PyrexTypes.error_type
self.entry.used = 1
if self.entry.type.is_buffer:
- # Have an rhs temp just in case. All rhs I could
- # think of had a single symbol result_code but better
- # safe than sorry. Feel free to change this.
import Buffer
Buffer.used_buffer_aux_vars(self.entry)
entry = self.entry
if entry:
entry.used = 1
+ if entry.type.is_buffer:
+ import Buffer
+ Buffer.used_buffer_aux_vars(entry)
if entry.utility_code:
env.use_utility_code(entry.utility_code)
# Buffer acquire and release tests
#
-@testcase
def nousage():
"""
- >>> True
- True
+ The challenge here is just compilation.
+ """
+ cdef object[int, 2] buf
+
+def printbuf():
+ """
+ Just compilation.
"""
cdef object[int, 2] buf
- # this used not to compile
+ print buf
@testcase
def acquire_release(o1, o2):