Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
eab2be2f
Commit
eab2be2f
authored
Aug 26, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release'
parents
51cc426a
1a6aba52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
CHANGES.rst
CHANGES.rst
+9
-3
tests/run/cpp_stl_string_ascii_auto_encoding.pyx
tests/run/cpp_stl_string_ascii_auto_encoding.pyx
+15
-2
No files found.
CHANGES.rst
View file @
eab2be2f
...
@@ -51,7 +51,7 @@ Bugs fixed
...
@@ -51,7 +51,7 @@ Bugs fixed
(Github issue #1837)
(Github issue #1837)
0.26.1 (2017-
??-??
)
0.26.1 (2017-
08-28
)
===================
===================
Features added
Features added
...
@@ -67,14 +67,20 @@ Bugs fixed
...
@@ -67,14 +67,20 @@ Bugs fixed
a reference to the buffer owner on release, thus not freeing the memory.
a reference to the buffer owner on release, thus not freeing the memory.
(Github issue #1638)
(Github issue #1638)
* Auto-decoding failed in 0.26 for strings inside of C++ containers.
(Github issue #1790)
* Compile error when inheriting from C++ container types.
(Github issue #1788)
* Invalid C code in generators (declaration after code).
* Invalid C code in generators (declaration after code).
(Github issue #1801)
(Github issue #1801)
* Arithmetic operations on ``const`` integer variables could generate invalid code.
* Arithmetic operations on ``const`` integer variables could generate invalid code.
(Github issue #1798)
.
(Github issue #1798)
* Local variables with names of special Python methods failed to compile inside of
* Local variables with names of special Python methods failed to compile inside of
closures
(Github issue #1797).
closures
. (Github issue #1797)
* Problem with indirect Emacs buffers in cython-mode.
* Problem with indirect Emacs buffers in cython-mode.
Patch by Martin Albrecht (Github issue #1743).
Patch by Martin Albrecht (Github issue #1743).
...
...
tests/run/cpp_stl_string_ascii_auto_encoding.pyx
View file @
eab2be2f
...
@@ -2,9 +2,8 @@
...
@@ -2,9 +2,8 @@
# tag: cpp, werror
# tag: cpp, werror
# cython: c_string_encoding=ascii, c_string_type=unicode
# cython: c_string_encoding=ascii, c_string_type=unicode
cimport
cython
from
libcpp.string
cimport
string
from
libcpp.string
cimport
string
from
libcpp.vector
cimport
vector
b_asdf
=
b'asdf'
b_asdf
=
b'asdf'
s_asdf
=
'asdf'
s_asdf
=
'asdf'
...
@@ -148,3 +147,17 @@ def test_str_cast(a):
...
@@ -148,3 +147,17 @@ def test_str_cast(a):
cdef
string
s
=
a
cdef
string
s
=
a
assert
s
.
length
()
==
<
size_t
>
len
(
a
),
"%d != %d"
%
(
s
.
length
(),
len
(
a
))
assert
s
.
length
()
==
<
size_t
>
len
(
a
),
"%d != %d"
%
(
s
.
length
(),
len
(
a
))
return
<
str
>
s
return
<
str
>
s
def
test_vector_of_strings
(
*
strings
):
"""
>>> results = test_vector_of_strings(b_asdf, u_asdf)
>>> results == [u_asdf, u_asdf] or results
True
>>> type(results[0]) is type(u_asdf) or type(results[0])
True
>>> type(results[1]) is type(u_asdf) or type(results[1])
True
"""
cdef
vector
[
string
]
v
=
strings
return
v
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment