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
67bf8435
Commit
67bf8435
authored
May 04, 2011
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't issue error or warning for arrays and buffers
parent
85c56cc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+7
-1
No files found.
Cython/Compiler/FlowControl.py
View file @
67bf8435
...
...
@@ -390,7 +390,13 @@ 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
:
messages
.
error
(
stat
.
pos
,
"local variable '%s' referenced before assignment"
%
stat
.
entry
.
name
)
if
stat
.
entry
.
type
.
is_buffer
:
pass
elif
stat
.
entry
.
type
.
is_pyobject
or
stat
.
entry
.
type
.
is_unspecified
:
messages
.
error
(
stat
.
pos
,
"local variable '%s' referenced before assignment"
%
stat
.
entry
.
name
)
elif
not
stat
.
entry
.
type
.
is_array
and
not
stat
.
entry
.
type
.
is_struct_or_union
:
# TODO: not sure here
messages
.
warning
(
stat
.
pos
,
"local variable '%s' referenced before assignment"
%
stat
.
entry
.
name
)
else
:
if
compiler_directives
[
'warn.maybe_uninitialized'
]:
messages
.
warning
(
stat
.
pos
,
"local variable '%s' might be referenced before assignment"
%
stat
.
entry
.
name
)
...
...
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