diff options
Diffstat (limited to 'docs/examples/tutorial/string/decode.pyx')
-rw-r--r-- | docs/examples/tutorial/string/decode.pyx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/examples/tutorial/string/decode.pyx b/docs/examples/tutorial/string/decode.pyx index c3e2faf68..79fc41835 100644 --- a/docs/examples/tutorial/string/decode.pyx +++ b/docs/examples/tutorial/string/decode.pyx @@ -1,9 +1,9 @@ -from c_func cimport get_a_c_string
-
-cdef char* c_string = NULL
-cdef Py_ssize_t length = 0
-
-# get pointer and length from a C function
-get_a_c_string(&c_string, &length)
-
-ustring = c_string[:length].decode('UTF-8')
+from c_func cimport get_a_c_string + +cdef char* c_string = NULL +cdef Py_ssize_t length = 0 + +# get pointer and length from a C function +get_a_c_string(&c_string, &length) + +ustring = c_string[:length].decode('UTF-8') |