summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2014-01-26 05:30:37 (GMT)
committerLarry Hastings <larry@hastings.org>2014-01-26 05:30:37 (GMT)
commitf256c22f34304c350c7a3f7ae14e2e7be9e88f0b (patch)
tree13f6731a883ba587f1bc9e80bd1fd48c990e3b1a /Tools
parentc20472640cff9f2cb513b1443897814d0328bea1 (diff)
downloadcpython-f256c22f34304c350c7a3f7ae14e2e7be9e88f0b.zip
cpython-f256c22f34304c350c7a3f7ae14e2e7be9e88f0b.tar.gz
cpython-f256c22f34304c350c7a3f7ae14e2e7be9e88f0b.tar.bz2
Fix for catestrophic errors in previous checkin (Argument Clinic rollup patch).
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/clinic/clinic.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 0dec258..184bb39 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)