Dag Sverre Seljebotn wrote: > Stefan Behnel wrote: >> Hi, >> >> the buffer API changed in Py3b3, without updating the PEP. The reasoning >> behind the changes were discussed in full length here: >> >> http://bugs.python.org/issue3139 >> >> Here's an incomplete patch that updates the struct, but that's definitely not >> enough, so I hope that Dag finds some time to fix things up. > > Yes, I do; consider this assigned to me. Some issues needs discussion > though:
OK, this is now fixed. I did some tricks with getbuffer implementations which are documented here: http://wiki.cython.org/docs/specialmethods As for Python 2.6, it appears that we have the option to generate objects using the new buffer slots, but we can also generate objects without. Thoughts? Mine: At least as long as NumPy doesn't implement this for 2.6, I'd like to stay with emulation. If I get the time then perhaps a "dual-mode" where the slots are checked first, and if the object doesn't have the slots (i.e. the flags of the type is set to not supporting the new buffers) then emulation is used. What is there works now though :-) -- Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
