Hello Kenton,

2010/1/18 Kenton Varda <ken...@google.com>:
(...snip...)
> As for code cleanliness, I find the Reset() method awkward since the user
> has to remember to call it at the same time as they do some other operation,
> like seeking the file descriptor.  Either calling Reset() or seeking the
> file descriptor alone will put the object in an inconsistent state.  It
> might make more sense to offer an actual Seek() method which can safely
> perform both operations together with an interface that is not so easy to
> misuse.

I agree, a 64bit Seek function would definitely be safer.
Here is a patch for version 2.3.0 to add FileInputStream::Seek(). The
patch also fixes a compiler warning.
I also adopted my library to use this function and it seems to work.
Regards, Jacob
-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.


Attachment: protobuf-2.3.0-Seek.patch
Description: Binary data

Reply via email to