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
0fac7569
Commit
0fac7569
authored
Apr 14, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.24.x'
parents
a9e41d96
d804bd2d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
4 deletions
+22
-4
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+6
-4
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+2
-0
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+4
-0
tests/run/cpp_stl.pyx
tests/run/cpp_stl.pyx
+10
-0
No files found.
Cython/Build/Dependencies.py
View file @
0fac7569
...
@@ -652,9 +652,11 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
...
@@ -652,9 +652,11 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
# workaround for setuptools
# workaround for setuptools
if
'setuptools'
in
sys
.
modules
:
if
'setuptools'
in
sys
.
modules
:
Extension_dustutils
=
sys
.
modules
[
'setuptools.extension'
].
_Extension
Extension_setuptools
=
sys
.
modules
[
'setuptools'
].
Extension
Extension_setuptools
=
sys
.
modules
[
'setuptools'
].
Extension
else
:
else
:
# dummy class, in case we do not have setuptools
# dummy class, in case we do not have setuptools
Extension_dustutils
=
Extension
class
Extension_setuptools
(
Extension
):
pass
class
Extension_setuptools
(
Extension
):
pass
for
pattern
in
patterns
:
for
pattern
in
patterns
:
...
@@ -665,7 +667,7 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
...
@@ -665,7 +667,7 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
base
=
None
base
=
None
exn_type
=
Extension
exn_type
=
Extension
ext_language
=
language
ext_language
=
language
elif
isinstance
(
pattern
,
(
Extension
,
Extension_setuptools
)):
elif
isinstance
(
pattern
,
(
Extension
_dustutils
,
Extension_setuptools
)):
for
filepattern
in
pattern
.
sources
:
for
filepattern
in
pattern
.
sources
:
if
os
.
path
.
splitext
(
filepattern
)[
1
]
in
(
'.py'
,
'.pyx'
):
if
os
.
path
.
splitext
(
filepattern
)[
1
]
in
(
'.py'
,
'.pyx'
):
break
break
...
...
Cython/Compiler/PyrexTypes.py
View file @
0fac7569
...
@@ -3493,6 +3493,8 @@ class CppClassType(CType):
...
@@ -3493,6 +3493,8 @@ class CppClassType(CType):
if
self
.
templates
==
other_type
.
templates
:
if
self
.
templates
==
other_type
.
templates
:
return
1
return
1
for
t1
,
t2
in
zip
(
self
.
templates
,
other_type
.
templates
):
for
t1
,
t2
in
zip
(
self
.
templates
,
other_type
.
templates
):
if
is_optional_template_param
(
t1
)
and
is_optional_template_param
(
t2
):
break
if
not
t1
.
same_as_resolved_type
(
t2
):
if
not
t1
.
same_as_resolved_type
(
t2
):
return
0
return
0
return
1
return
1
...
...
Cython/Utility/ModuleSetupCode.c
View file @
0fac7569
...
@@ -119,6 +119,10 @@
...
@@ -119,6 +119,10 @@
#define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
#define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
#endif
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
#define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#endif
...
...
tests/run/cpp_stl.pyx
View file @
0fac7569
...
@@ -37,6 +37,16 @@ def test_vector(L):
...
@@ -37,6 +37,16 @@ def test_vector(L):
print
v
.
at
(
i
)
print
v
.
at
(
i
)
del
v
del
v
ctypedef
int
my_int
def
test_vector_typedef
(
L
):
"""
>>> test_vector_typedef([1, 2, 3])
[1, 2, 3]
"""
cdef
vector
[
my_int
]
v
=
L
cdef
vector
[
int
]
vv
=
v
return
vv
def
test_vector_iterator
(
L
):
def
test_vector_iterator
(
L
):
"""
"""
>>> test_vector([11, 37, 389, 5077])
>>> test_vector([11, 37, 389, 5077])
...
...
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