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
Kirill Smelkov
cython
Commits
d9316a64
Commit
d9316a64
authored
Apr 09, 2013
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #204 from vmx/constcast
Add casting to const
parents
f376a8bf
7dbd42a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-0
tests/compile/constcast.pyx
tests/compile/constcast.pyx
+8
-0
No files found.
Cython/Compiler/Nodes.py
View file @
d9316a64
...
...
@@ -1125,9 +1125,11 @@ class FusedTypeNode(CBaseTypeNode):
class
CConstTypeNode
(
CBaseTypeNode
):
# name string
# base_type CBaseTypeNode
child_attrs
=
[
"base_type"
]
name
=
'const'
def
analyse
(
self
,
env
,
could_be_name
=
False
):
base
=
self
.
base_type
.
analyse
(
env
,
could_be_name
)
...
...
tests/compile/constcast.pyx
0 → 100644
View file @
d9316a64
# mode: compile
from
libc.stdlib
cimport
malloc
,
free
cdef
void
f
():
cdef
const
int
**
allocated
=
<
const
int
**>
malloc
(
sizeof
(
int
*
))
free
(
allocated
)
f
()
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