Message128761
> To support bigger timestamps, we have to change the file format
> of .pyc files.
write_compiled_module(), check_compiled_module() and other functions use the marshal module to read/write binary file, but marshal has no function for int64_t, only for long (which may be 32 bits, especially on Windows).
I don't know if Python has a builtin 64 bits integer type. There is PY_LONG_LONG, but this type is optional. A possible solution is to always store timestamp as 64 bits signed integer, but reject timestamp > 2^32 (as currently) if we don't have 64 bits integer type (like PY_LONG_LONG). Something like:
#ifdef PY_LONG_LONG
write_timestamp64(t);
#else
if (t << 32) { error; }
write_timestamp32(t);
write_long32(0); /* emulate 64 bits in big endian */
#endif |
|
Date |
User |
Action |
Args |
2011-02-17 22:08:52 | vstinner | set | recipients:
+ vstinner, barry, ncoghlan, belopolsky, Arfrever, Guy.Kisel |
2011-02-17 22:08:52 | vstinner | set | messageid: <1297980532.49.0.0691746281849.issue11235@psf.upfronthosting.co.za> |
2011-02-17 22:08:51 | vstinner | link | issue11235 messages |
2011-02-17 22:08:50 | vstinner | create | |
|