Closed scottnuma closed 5 years ago
Hmm I think it would be pretty fast to implement. I should test to double check, but I think the current mode accepts raw bytes. Text mode would just have an intermediate step of encoding to UTF-8.
I think this might also have some nice opportunities to mesh with TextIOWrapper https://docs.python.org/3/library/io.html#io.TextIOWrapper
I'll look into this.
On Fri, Mar 8, 2019 at 12:53 PM Libo Chen notifications@github.com wrote:
@Chenlibo commented on this pull request.
In test/sfs.py https://github.com/jssmith/ssqlite/pull/43#discussion_r263926141:
def write(self, content_bytes):
- content_len = len(content_bytes)
- write_status = c_helper.nfs4_pwrite(self._file, content_bytes, self._pos, content_len)
- if write_status != NFS4_OK:
- if write_status == NFS4ERR_OPENMODE:
- array = ctypes.c_byte * len(content_bytes)
I think so. That may require a major change in how we implement buffering?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jssmith/ssqlite/pull/43#discussion_r263926141, or mute the thread https://github.com/notifications/unsubscribe-auth/AGULte0D-GeQKimPZ6ztypREYpH55yMpks5vUs2sgaJpZM4bdxKC .
Merge after PR #42