summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
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)