Commit 454d5be2 authored by Robert Bradshaw's avatar Robert Bradshaw

Don't need terminating null for Python conversion.

parent 6c21bf3b
......@@ -18,12 +18,12 @@ cdef string {{cname}}(object o) except *:
#from libcpp.string cimport string
cdef extern from *:
cdef cppclass string "const std::string":
char* c_str()
char* data()
size_t size()
@cname("{{cname}}")
cdef object {{cname}}(string& s):
return s.c_str()[:s.size()]
return s.data()[:s.size()]
#################### vector.from_py ####################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment