Commit a7697342 authored by Kurt Smith's avatar Kurt Smith Committed by Mark Florisson

stub for memoryview put_assign_to_memview

parent 5f37f843
......@@ -1650,6 +1650,9 @@ class NameNode(AtomicExprNode):
rhs.generate_disposal_code(code)
rhs.free_temps(code)
else:
if self.type.is_memoryview:
self.generate_acquire_memoryview(rhs, code)
if self.type.is_buffer:
# Generate code for doing the buffer release/acquisition.
# This might raise an exception in which case the assignment (done
......@@ -1693,6 +1696,13 @@ class NameNode(AtomicExprNode):
rhs.generate_post_assignment_code(code)
rhs.free_temps(code)
def generate_acquire_memoryview(self, rhs, code):
import MemoryView
import pdb; pdb.set_trace()
MemoryView.put_assign_to_memview(self.result(), rhs.result(), self.entry,
is_initialized=not self.lhs_of_first_assignment,
pos=self.pos, code=code)
def generate_acquire_buffer(self, rhs, code):
# rhstmp is only used in case the rhs is a complicated expression leading to
# the object, to avoid repeating the same C expression for every reference
......@@ -7578,9 +7588,6 @@ class CoerceToMemViewNode(CoercionNode):
self.type = dst_type
self.is_temp = 1
self.env = env
import MemoryView
self.env.use_utility_code(MemoryView.obj_to_memview_code)
# MemoryView.use_memview_cwrap(env)
def generate_result_code(self, code):
import MemoryView
......
......@@ -64,6 +64,10 @@ _typename_to_format = {
def format_from_type(base_type):
return _typename_to_format[base_type.sign_and_name()]
def put_assign_to_memview(lhs_cname, rhs_cname, buf_entry,
is_initialized, pos, code):
pass
def get_buf_flag(specs):
is_c_contig, is_f_contig = is_cf_contig(specs)
......
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