Commit d9316a64 authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #204 from vmx/constcast

Add casting to const
parents f376a8bf 7dbd42a4
...@@ -1125,9 +1125,11 @@ class FusedTypeNode(CBaseTypeNode): ...@@ -1125,9 +1125,11 @@ class FusedTypeNode(CBaseTypeNode):
class CConstTypeNode(CBaseTypeNode): class CConstTypeNode(CBaseTypeNode):
# name string
# base_type CBaseTypeNode # base_type CBaseTypeNode
child_attrs = ["base_type"] child_attrs = ["base_type"]
name = 'const'
def analyse(self, env, could_be_name = False): def analyse(self, env, could_be_name = False):
base = self.base_type.analyse(env, could_be_name) base = self.base_type.analyse(env, could_be_name)
......
# mode: compile
from libc.stdlib cimport malloc, free
cdef void f():
cdef const int **allocated = <const int **>malloc(sizeof(int *))
free(allocated)
f()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment