Permalink
Browse files

Fix type names as arg names for int types.

  • Loading branch information...
robertwb committed Nov 1, 2012
1 parent 4359a04 commit 762c9d659f155ff96113986f7a4ead8b916c55f7
Showing with 7 additions and 1 deletion.
  1. +7 −1 Cython/Compiler/Nodes.py
View
@@ -706,7 +706,13 @@ def analyse(self, env, nonempty = 0, is_self_arg = False):
# We fix that here.
if isinstance(self.declarator, CNameDeclaratorNode) and self.declarator.name == '':
if nonempty:
- self.declarator.name = EncodedString(self.base_type.name)
+ if self.base_type.is_basic_c_type:
+ # char, short, long called "int"
+ type = self.base_type.analyse(env, could_be_name = True)
+ arg_name = type.declaration_code("")
+ else:
+ arg_name = self.base_type.name
+ self.declarator.name = EncodedString(arg_name)
self.base_type.name = None
self.base_type.is_basic_c_type = False
could_be_name = True

0 comments on commit 762c9d6

Please sign in to comment.