Commit aa51c51c authored by Stefan Behnel's avatar Stefan Behnel

raise compiler error for 'cdef readonly class'

parent b357710a
......@@ -2026,9 +2026,11 @@ def p_c_class_definition(s, level, pos,
error(pos, "Object struct name specification required for 'public' C class")
if not typeobj_name:
error(pos, "Type object name specification required for 'public' C class")
else:
elif visibility == 'private':
if api:
error(pos, "Only 'public' C class can be declared 'api'")
else:
error(pos, "Invalid class visibility '%s'" % visibility)
return Nodes.CClassDefNode(pos,
visibility = visibility,
typedef_flag = typedef_flag,
......
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