Skip to content

Commit

Permalink
pybind: auto encode/decode cstr
Browse files Browse the repository at this point in the history
assuming all string in the cythonized string use the legacy python2
string type, instead of using the unicode, and assuming all c strings
are ASCII, so we don't need encode/decode them when coerce from/to C
strings.

this helps when generating py3 bindings

Signed-off-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Feb 21, 2019
1 parent ded3d43 commit c36d0f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pybind/rados/rados.pyx
@@ -1,4 +1,4 @@
# cython: embedsignature=True
# cython: embedsignature=True, c_string_type=str, c_string_encoding=ascii
"""
This module is a thin wrapper around librados.
Expand Down
2 changes: 1 addition & 1 deletion src/pybind/rbd/rbd.pyx
@@ -1,4 +1,4 @@
# cython: embedsignature=True
# cython: embedsignature=True, c_string_type=str, c_string_encoding=ascii
"""
This module is a thin wrapper around librbd.
Expand Down

0 comments on commit c36d0f1

Please sign in to comment.