Given a list of api dicts defining the numpy C API, compute a checksum of the list of items in the API (as a string).
(api_dicts)
| 509 | return [a[1] for a in dfunctions] |
| 510 | |
| 511 | def fullapi_hash(api_dicts): |
| 512 | """Given a list of api dicts defining the numpy C API, compute a checksum |
| 513 | of the list of items in the API (as a string).""" |
| 514 | a = [] |
| 515 | for d in api_dicts: |
| 516 | for name, data in order_dict(d): |
| 517 | a.extend(name) |
| 518 | a.extend(','.join(map(str, data))) |
| 519 | |
| 520 | return hashlib.md5(''.join(a).encode('ascii')).hexdigest() |
| 521 | |
| 522 | # To parse strings like 'hex = checksum' where hex is e.g. 0x1234567F and |
| 523 | # checksum a 128 bits md5 checksum (hex format as well) |
no test coverage detected