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
22cb7155
Commit
22cb7155
authored
May 11, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Buffer is normal object, remove workaround
parent
5183ca9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+2
-7
No files found.
Cython/Compiler/FlowControl.py
View file @
22cb7155
import
cython
cython
.
declare
(
PyrexTypes
=
object
,
Naming
=
object
,
ExprNodes
=
object
,
Nodes
=
object
,
Options
=
object
,
UtilNodes
=
object
,
ModuleNode
=
object
,
...
...
@@ -392,9 +393,7 @@ def check_definitions(flow, compiler_directives):
if
stat
.
entry
.
from_closure
or
stat
.
node
.
allow_null
:
pass
# Can be uninitialized here
elif
len
(
state
[
stat
.
entry
])
==
1
:
if
stat
.
entry
.
type
.
is_buffer
:
pass
elif
stat
.
entry
.
type
.
is_pyobject
or
stat
.
entry
.
type
.
is_unspecified
:
if
stat
.
entry
.
type
.
is_pyobject
or
stat
.
entry
.
type
.
is_unspecified
:
messages
.
error
(
stat
.
pos
,
"local variable '%s' referenced before assignment"
%
stat
.
entry
.
name
)
else
:
if
compiler_directives
[
'warn.maybe_uninitialized'
]:
...
...
@@ -420,10 +419,6 @@ def check_definitions(flow, compiler_directives):
for
entry
in
flow
.
entries
:
if
not
entry
.
cf_references
and
not
entry
.
is_pyclass_attr
and
not
entry
.
in_closure
:
# TODO: handle unused buffers
if
entry
.
type
.
is_buffer
:
entry
.
cf_used
=
True
continue
# TODO: starred args entries are not marked with is_arg flag
for
assmt
in
entry
.
cf_assignments
:
if
assmt
.
is_arg
:
...
...
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