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
745ac5d9
Commit
745ac5d9
authored
Aug 21, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3 fix
parent
1a38e0ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
Cython/Compiler/Buffer.py
Cython/Compiler/Buffer.py
+2
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+5
-0
No files found.
Cython/Compiler/Buffer.py
View file @
745ac5d9
...
@@ -146,8 +146,8 @@ def analyse_buffer_options(globalpos, env, posargs, dictargs, defaults=None, nee
...
@@ -146,8 +146,8 @@ def analyse_buffer_options(globalpos, env, posargs, dictargs, defaults=None, nee
for
name
,
(
value
,
pos
)
in
dictargs
.
iteritems
():
for
name
,
(
value
,
pos
)
in
dictargs
.
iteritems
():
if
not
name
in
buffer_options
:
if
not
name
in
buffer_options
:
raise
CompileError
(
pos
,
ERR_BUF_OPTION_UNKNOWN
%
name
)
raise
CompileError
(
pos
,
ERR_BUF_OPTION_UNKNOWN
%
name
)
options
[
name
.
encode
(
"ASCII"
)
]
=
value
options
[
name
]
=
value
for
name
,
(
value
,
pos
)
in
zip
(
buffer_options
,
posargs
):
for
name
,
(
value
,
pos
)
in
zip
(
buffer_options
,
posargs
):
if
not
name
in
buffer_options
:
if
not
name
in
buffer_options
:
raise
CompileError
(
pos
,
ERR_BUF_OPTION_UNKNOWN
%
name
)
raise
CompileError
(
pos
,
ERR_BUF_OPTION_UNKNOWN
%
name
)
...
...
Cython/Compiler/Nodes.py
View file @
745ac5d9
...
@@ -735,6 +735,11 @@ class CBufferAccessTypeNode(CBaseTypeNode):
...
@@ -735,6 +735,11 @@ class CBufferAccessTypeNode(CBaseTypeNode):
self
.
keyword_args
,
self
.
keyword_args
,
base_type
.
buffer_defaults
)
base_type
.
buffer_defaults
)
if
sys
.
version_info
[
0
]
<
3
:
# Py 2.x enforces byte strings as keyword arguments ...
options
=
dict
([
(
name
.
encode
(
'ASCII'
),
value
)
for
name
,
value
in
options
.
iteritems
()
])
self
.
type
=
PyrexTypes
.
BufferType
(
base_type
,
**
options
)
self
.
type
=
PyrexTypes
.
BufferType
(
base_type
,
**
options
)
return
self
.
type
return
self
.
type
...
...
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