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
d48faaeb
Commit
d48faaeb
authored
Nov 14, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
array size must be set as int, not numeric string
parent
ec09b000
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+5
-0
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+1
-0
No files found.
Cython/Compiler/Nodes.py
View file @
d48faaeb
...
...
@@ -442,6 +442,11 @@ class CArrayDeclaratorNode(CDeclaratorNode):
if
not
self
.
dimension
.
type
.
is_int
:
error
(
self
.
dimension
.
pos
,
"Array dimension not integer"
)
size
=
self
.
dimension
.
result
()
try
:
size
=
int
(
size
)
except
ValueError
:
# runtime constant?
pass
else
:
size
=
None
if
not
base_type
.
is_complete
():
...
...
Cython/Compiler/PyrexTypes.py
View file @
d48faaeb
...
...
@@ -616,6 +616,7 @@ class CArrayType(CType):
is_array
=
1
def
__init__
(
self
,
base_type
,
size
):
assert
size
is
None
or
isinstance
(
size
,
int
),
repr
(
size
)
self
.
base_type
=
base_type
self
.
size
=
size
if
base_type
is
c_char_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