2828# Names of functions in the object-description struct.
2929#
3030FUNCLIST = ['new' , 'tp_dealloc' , 'tp_print' , 'tp_getattr' , 'tp_setattr' ,
31- 'tp_compare' , 'tp_repr' , 'tp_hash' ]
31+ 'tp_compare' , 'tp_repr' , 'tp_hash' , 'tp_call' , 'tp_str' ]
3232TYPELIST = ['tp_as_number' , 'tp_as_sequence' , 'tp_as_mapping' , 'structure' ]
3333
3434#
@@ -81,7 +81,8 @@ def writecode(self, fp):
8181 for fn in self .methodlist :
8282 self .method = fn
8383 self .addcode ('module_method' , fp )
84- new_ml = new_ml + ('{"%s",\t %s_%s,\t 1},\n ' % (fn , self .abbrev , fn ))
84+ new_ml = new_ml + ('{"%s",\t %s_%s,\t 1,\t %s_%s__doc__},\n '
85+ % (fn , self .abbrev , fn , self .abbrev , fn ))
8586 self .methodlist = new_ml
8687 self .addcode ('module_tail' , fp )
8788
@@ -106,7 +107,8 @@ def writebody(self, fp):
106107 for fn in self .methodlist :
107108 self .method = fn
108109 self .addcode ('object_method' , fp )
109- new_ml = new_ml + ('{"%s",\t %s_%s,\t 1},\n ' % (fn , self .abbrev , fn ))
110+ new_ml = new_ml + ('{"%s",\t %s_%s,\t 1,\t %s_%s__doc__},\n '
111+ % (fn , self .abbrev , fn , self .abbrev , fn ))
110112 self .methodlist = new_ml
111113 self .addcode ('object_mlist' , fp )
112114
0 commit comments