From bdce80e5070b0dad416c9286a372f6ac5ffa3eef Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 21 Dec 2007 19:21:48 +0000 Subject: [PATCH] handle template arguments with spaces (like 'long int') --- pybindgen/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pybindgen/utils.py b/pybindgen/utils.py index a0dfb74..30f5d75 100644 --- a/pybindgen/utils.py +++ b/pybindgen/utils.py @@ -74,7 +74,8 @@ def get_mangled_name(base_name, template_args): assert isinstance(template_args, (tuple, list)) if template_args: - return '%s__lt__%s__gt__' % (base_name, '_'.join(template_args)) + return '%s__lt__%s__gt__' % (base_name, '_'.join( + [arg.replace(' ', '_') for arg in template_args])) else: return base_name