projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7af9d48
)
std::string.c_str() actually returns a 'const char*', add declaration of std::string...
author
Stefan Behnel
<stefan_ml@behnel.de>
Fri, 6 Jul 2012 23:35:32 +0000
(
01:35
+0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Fri, 6 Jul 2012 23:35:32 +0000
(
01:35
+0200)
Cython/Includes/libcpp/string.pxd
patch
|
blob
|
history
diff --git
a/Cython/Includes/libcpp/string.pxd
b/Cython/Includes/libcpp/string.pxd
index
b2f8712
..
6133222
100644
(file)
--- a/
Cython/Includes/libcpp/string.pxd
+++ b/
Cython/Includes/libcpp/string.pxd
@@
-1,3
+1,5
@@
+from libc.string cimport const_char
+
cdef extern from "<string>" namespace "std":
size_t npos = -1
@@
-10,7
+12,8
@@
cdef extern from "<string>" namespace "std":
# as a string formed by a repetition of character c, n times.
string(size_t, char)
- char* c_str() nogil
+ const_char* c_str() nogil
+ const_char* data() nogil
size_t size() nogil
size_t max_size() nogil
size_t length() nogil