Conversation
It looks like that seek operation behave differently between *nix and Windows. Maybe it is something about alignment or overflow. I'm not familiar with that. cc @Xuanwo Any idea? |
As far as I know, *nix systems shouldn't behave differently when it comes to seeking. I also haven't found anything wrong with our implementation. Could this issue be more deeply rooted, perhaps within purego itself? |
fb3cfb3 to
c5291e4
Compare
|
Well, I see now. It's my bad to have treated the struct as a pointer. So happy that the behavior test is actually ensuring multiplatform support. |
|
It is ready now. PS: I added the breaking-changes label as I change the C-binding signature of reader_seek |
Follow #6119.
Part of #4892.
This PR aims to implement the offset-based read operation requested in #5326 by supporting the
io.Seekerinterface.FYI: https://pkg.go.dev/io#Seeker
In a previous closed PR, I attempted to implement
io.ReaderAtwithout a proper design. Now, we can directly useopendal_reader_seekto supportio.Seeker!The difference between
io.Seekerandio.ReaderAtis thatio.ReaderAtallows for parallel offset-based reading.NOTICE: I made some changes to the signature of the C seek function.