[pywin32-checkins] pywin32/com/win32com/client build.py,1.38,1.39
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-01-25 03:35:19
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv307/com/win32com/client Modified Files: build.py Log Message: sort the vtable entries in a py2k and py3k-friendly way Index: build.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/build.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** build.py 9 Jan 2009 01:29:29 -0000 1.38 --- build.py 25 Jan 2009 03:35:15 -0000 1.39 *************** *** 390,399 **** assert typeinfo is not None, "Cant build vtables without type info!" - def cmp_vtable_off(m1, m2): - return cmp(m1.desc[7], m2.desc[7]) - meth_list = list(self.mapFuncs.values()) + list(self.propMapGet.values()) + list(self.propMapPut.values()) ! meth_list.sort( cmp_vtable_off ) # Now turn this list into the run-time representation # (ready for immediate use or writing to gencache) --- 390,402 ---- assert typeinfo is not None, "Cant build vtables without type info!" meth_list = list(self.mapFuncs.values()) + list(self.propMapGet.values()) + list(self.propMapPut.values()) ! if sys.version_info < (2,4): ! def cmp_vtable_off(m1, m2): ! return cmp(m1.desc[7], m2.desc[7]) ! meth_list.sort(cmp_vtable_off) ! else: ! meth_list.sort(key=lambda m: m.desc[7]) ! # Now turn this list into the run-time representation # (ready for immediate use or writing to gencache) |