This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, Guy.Kisel, barry, belopolsky, ncoghlan, vstinner
Date 2011-02-17.22:08:50
SpamBayes Score 4.588271e-06
Marked as misclassified No
Message-id <1297980532.49.0.0691746281849.issue11235@psf.upfronthosting.co.za>
In-reply-to
Content
> 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
History
Date User Action Args
2011-02-17 22:08:52vstinnersetrecipients: + vstinner, barry, ncoghlan, belopolsky, Arfrever, Guy.Kisel
2011-02-17 22:08:52vstinnersetmessageid: <1297980532.49.0.0691746281849.issue11235@psf.upfronthosting.co.za>
2011-02-17 22:08:51vstinnerlinkissue11235 messages
2011-02-17 22:08:50vstinnercreate