diff options
author | Larry Hastings <larry@hastings.org> | 2014-01-25 21:30:37 -0800 |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-01-25 21:30:37 -0800 |
commit | f40cbc15bb26add64b725c85b2ccff688e34335e (patch) | |
tree | be793527feada9c5fcb9a9fce8946ab5794526e3 /Tools/clinic/clinic.py | |
parent | 1271e91660c0e2d99e82e687927f8510743cc441 (diff) | |
download | cpython-f40cbc15bb26add64b725c85b2ccff688e34335e.tar.gz |
Fix for catestrophic errors in previous checkin (Argument Clinic rollup patch).
Diffstat (limited to 'Tools/clinic/clinic.py')
-rwxr-xr-x | Tools/clinic/clinic.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 0dec2589d1..184bb39057 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -2593,7 +2593,11 @@ class self_converter(CConverter): def set_template_dict(self, template_dict): template_dict['self_name'] = self.name template_dict['self_type'] = self.parser_type - template_dict['self_type_check'] = '({self_name} == {self_type_object}) &&\n ' + if ((self.function.kind == METHOD_NEW) and + self.function.cls and + self.function.cls.typedef): + template_dict['self_type_object'] = self.function.cls.type_object + template_dict['self_type_check'] = '({self_name} == {self_type_object}) &&\n '.format_map(template_dict) |