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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
15e0eae3
Commit
15e0eae3
authored
Jul 25, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt usages of map() to Py2/Py3
parent
1e61ef14
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
Cython/Build/Cythonize.py
Cython/Build/Cythonize.py
+2
-2
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+1
-1
Cython/Compiler/StringEncoding.py
Cython/Compiler/StringEncoding.py
+1
-1
Cython/Debugger/libcython.py
Cython/Debugger/libcython.py
+1
-1
No files found.
Cython/Build/Cythonize.py
View file @
15e0eae3
...
@@ -62,9 +62,9 @@ def find_package_base(path):
...
@@ -62,9 +62,9 @@ def find_package_base(path):
def
cython_compile
(
path_pattern
,
options
):
def
cython_compile
(
path_pattern
,
options
):
pool
=
None
pool
=
None
paths
=
map
(
os
.
path
.
abspath
,
extended_iglob
(
path_pattern
))
all_
paths
=
map
(
os
.
path
.
abspath
,
extended_iglob
(
path_pattern
))
try
:
try
:
for
path
in
paths
:
for
path
in
all_
paths
:
if
options
.
build_inplace
:
if
options
.
build_inplace
:
base_dir
=
path
base_dir
=
path
while
not
os
.
path
.
isdir
(
base_dir
)
or
is_package_dir
(
base_dir
):
while
not
os
.
path
.
isdir
(
base_dir
)
or
is_package_dir
(
base_dir
):
...
...
Cython/Compiler/PyrexTypes.py
View file @
15e0eae3
...
@@ -2536,7 +2536,7 @@ class CFuncType(CType):
...
@@ -2536,7 +2536,7 @@ class CFuncType(CType):
self
.
is_strict_signature
=
is_strict_signature
self
.
is_strict_signature
=
is_strict_signature
def
__repr__
(
self
):
def
__repr__
(
self
):
arg_reprs
=
map
(
repr
,
self
.
args
)
arg_reprs
=
list
(
map
(
repr
,
self
.
args
)
)
if
self
.
has_varargs
:
if
self
.
has_varargs
:
arg_reprs
.
append
(
"..."
)
arg_reprs
.
append
(
"..."
)
if
self
.
exception_value
:
if
self
.
exception_value
:
...
...
Cython/Compiler/StringEncoding.py
View file @
15e0eae3
...
@@ -289,7 +289,7 @@ def split_string_literal(s, limit=2000):
...
@@ -289,7 +289,7 @@ def split_string_literal(s, limit=2000):
def
encode_pyunicode_string
(
s
):
def
encode_pyunicode_string
(
s
):
"""Create Py_UNICODE[] representation of a given unicode string.
"""Create Py_UNICODE[] representation of a given unicode string.
"""
"""
s
=
map
(
ord
,
s
)
+
[
0
]
s
=
list
(
map
(
ord
,
s
)
)
+
[
0
]
if
sys
.
maxunicode
>=
0x10000
:
# Wide build or Py3.3
if
sys
.
maxunicode
>=
0x10000
:
# Wide build or Py3.3
utf16
,
utf32
=
[],
s
utf16
,
utf32
=
[],
s
...
...
Cython/Debugger/libcython.py
View file @
15e0eae3
...
@@ -731,7 +731,7 @@ class CyImport(CythonCommand):
...
@@ -731,7 +731,7 @@ class CyImport(CythonCommand):
for
marker
in
module
.
find
(
'LineNumberMapping'
):
for
marker
in
module
.
find
(
'LineNumberMapping'
):
cython_lineno
=
int
(
marker
.
attrib
[
'cython_lineno'
])
cython_lineno
=
int
(
marker
.
attrib
[
'cython_lineno'
])
c_linenos
=
map
(
int
,
marker
.
attrib
[
'c_linenos'
].
split
(
))
c_linenos
=
list
(
map
(
int
,
marker
.
attrib
[
'c_linenos'
].
split
()
))
cython_module
.
lineno_cy2c
[
cython_lineno
]
=
min
(
c_linenos
)
cython_module
.
lineno_cy2c
[
cython_lineno
]
=
min
(
c_linenos
)
for
c_lineno
in
c_linenos
:
for
c_lineno
in
c_linenos
:
cython_module
.
lineno_c2cy
[
c_lineno
]
=
cython_lineno
cython_module
.
lineno_c2cy
[
c_lineno
]
=
cython_lineno
...
...
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