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

Solution to Null Byte restriction? #63

Open
mkmoisen opened this issue Feb 11, 2017 · 0 comments
Open

Solution to Null Byte restriction? #63

mkmoisen opened this issue Feb 11, 2017 · 0 comments

Comments

@mkmoisen
Copy link
Owner

https://docs.python.org/2/c-api/arg.html

s#

s# (string, Unicode or any read buffer compatible object) [const char *, int (or Py_ssize_t, see below)]

This variant on s stores into two C variables, the first one a pointer to a character string, the second one its length. In this case the Python string may contain embedded null bytes. Unicode objects pass back a pointer to the default encoded string version of the object if such a conversion is possible. All other read-buffer compatible objects pass back a reference to the raw internal data representation.
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

1 participant