Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fundamental fix of peek/read interference #188

Open
shirok opened this issue Mar 20, 2016 · 2 comments
Open

Fundamental fix of peek/read interference #188

shirok opened this issue Mar 20, 2016 · 2 comments

Comments

@shirok
Copy link
Owner

shirok commented Mar 20, 2016

Scm_Peekc currently ignores scratch buffer. GETC_SCRATCH still has issues with keeping remaining octets in scratch buffer.

Related: #186

@shkmr
Copy link
Contributor

shkmr commented Mar 20, 2016

In your comment in #186, you suggest
putting spectial mark on char object
when invalid byte sequence is encountered.

Would it be possible just raising an error
in that case? (possibly with an API to get
the bytes in question.)

@shirok
Copy link
Owner Author

shirok commented Mar 20, 2016

That could be one solution. Invalid byte sequences could throw an error in CES conversion routine anyway, so wrapping invalid octet as a special kind of char is at most an unreliable abstraction (meaning, you can't count on it everywhere).
My concern is that occasionally you do encounter unexpected data, and sometimes throwing an error is inconvenient. But probably a flaky abstraction won't do much good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants