Richard Hansen added the comment: >> When I compile and run the above (latest Cython from Git master), I >> get: >> >> () >> () > > With Cython version 0.20.1post0 I get: > > >>> foo.foo() > (-1,) > (-1,) > > If you get the correct output from the latest Cython, it looks like > this issue has been fixed.
Oops, I was running a locally modified version of Cython that contained a patch meant to work around issue #23349. When I run the *actual* upstream master I get the same behavior that you do. But either way, I don't see why it's a problem that it prints (-1,) for the PyBUF_ND case. The consumer didn't request suboffsets information so I would expect it to be OK for the producer to put whatever it wants in the suboffsets field, including a junk pointer that would segfault upon dereference. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23352> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com