Buffer: Added casts to get rid of warnings for extension type buffers
Buffer: Added casts to get rid of warnings for extension type buffers

bhy/cython-haoyu,bhy/cython-haoyu,bhy/cython-haoyu,bhy/cython-haoyu