Produce the data for a timestamp-based pyc.
(code, mtime=0, source_size=0)
| 509 | |
| 510 | |
| 511 | def _code_to_timestamp_pyc(code, mtime=0, source_size=0): |
| 512 | "Produce the data for a timestamp-based pyc." |
| 513 | data = bytearray(MAGIC_NUMBER) |
| 514 | data.extend(_pack_uint32(0)) |
| 515 | data.extend(_pack_uint32(mtime)) |
| 516 | data.extend(_pack_uint32(source_size)) |
| 517 | data.extend(marshal.dumps(code)) |
| 518 | return data |
| 519 | |
| 520 | |
| 521 | def _code_to_hash_pyc(code, source_hash, checked=True): |
no test coverage detected
searching dependent graphs…