42 pointsby todsacerdoti3 days ago1 comment
  • caroma day ago
    Can someone explain the "restartable function" aspect of the proposal? I'm not familiar with that term and I don't see an explanation in the proposal or blog.
    • wrsa day ago
      The word “restartable” for C stdlib string functions means the function can return an intermediate answer or error in mid-string, and you can then continue processing the rest of the string. For example, returning a byte count or pointer to where it left off, which you can pass back in. In this case I think the mbstate_t handles that.
      • o11ca day ago
        It might also refer to the fact that it's not an error if you're lead with a leading byte at the end of the current buffer if you're planning to stream more still.
    • leni536a day ago
      I believe it refers to the mbstate_t* function parameter. It handles chunked transcoding, where chunk boundaries can be in the middle of multi-byte characters. You can than carry this state from one chunk to the next.