(self, method)
| 297 | IMPLEMENT = None |
| 298 | |
| 299 | def get_index_of_method(self, method): |
| 300 | # This code is horrible but not totally my fault |
| 301 | # the PyCFuncPtrObject->index is not exposed to Python.. |
| 302 | # repr is: '<COM method offset 2: WinFunctionType at 0x035DDBE8>' |
| 303 | rpr = repr(method) |
| 304 | if not rpr.startswith("<COM method offset ") or ":" not in rpr: |
| 305 | raise ValueError("Could not extract offset of {0}".format(rpr)) |
| 306 | return int(rpr[len("<COM method offset "): rpr.index(":")]) |
| 307 | |
| 308 | def extract_methods_order(self, interface): |
| 309 | index_and_method = sorted((self.get_index_of_method(m),name, m) for name, m in interface._functions_.items()) |
no test coverage detected