Commit fa764071 authored by Stefan Behnel's avatar Stefan Behnel

removed confusing dead code

parent 3cc00685
...@@ -1189,27 +1189,16 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -1189,27 +1189,16 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln( code.putln(
"}") "}")
# Do not traverse memoryview attributes of memoryview slices # Traverse buffer exporting objects.
# Note: not traversing memoryview attributes of memoryview slices!
# When triggered by the GC, it would cause multiple visits (gc_refs # When triggered by the GC, it would cause multiple visits (gc_refs
# subtractions which is not matched by its reference count!) # subtractions which is not matched by its reference count!)
for entry in py_buffers: # + memoryview_slices: for entry in py_buffers:
if entry.type == PyrexTypes.c_py_buffer_type: cname = entry.cname + ".obj"
cname = entry.cname + ".obj"
else:
# traverse the memoryview object, which should traverse the
# object exposing the buffer
# cname = entry.cname + ".memview"
pass
code.putln("if (p->%s) {" % cname) code.putln("if (p->%s) {" % cname)
code.putln( "e = (*v)(p->%s, a); if (e) return e;" % cname) code.putln( "e = (*v)(p->%s, a); if (e) return e;" % cname)
code.putln("}") code.putln("}")
#if cclass_entry.cname == '__pyx_memoryviewslice':
# code.putln("if (p->from_slice.memview) {")
# code.putln( "e = (*v)((PyObject *) p->from_slice.memview, a); if (e) return e;")
# code.putln("}")
code.putln( code.putln(
"return 0;") "return 0;")
code.putln( code.putln(
......
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