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

Add peekCString, withCString for converting NUL terminated C strings #254

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 6, 2021

  1. Add peekCString, withCString for converting NUL terminated C strings

    Since NUL-terminated CString is much more common in foreign APIs than
    CStringLen, one should not have to manually build these functions out
    of `peekCStringLen`, `withCStringLen` (and perhaps get it wrong, like
    I did in jgm/cmark-hs#13).
    
    While here, document that `withCStringLen` is O(n) as well.
    
    Fixes haskell#32.
    
    Signed-off-by: Anders Kaseorg <andersk@mit.edu>
    andersk committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    d5b40df View commit details
    Browse the repository at this point in the history