Issue #7989: Added pure python implementation of the datetime module.

This commit is contained in:
Alexander Belopolsky 2010-07-23 19:25:47 +00:00
parent c2721b0cd0
commit cf86e368eb
9 changed files with 5813 additions and 3670 deletions

View file

@ -170,7 +170,7 @@ _symtable symtablemodule.c
#atexit atexitmodule.c # Register functions to be run at interpreter-shutdown
#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
#_pickle _pickle.c # pickle accelerator
#datetime datetimemodule.c # date/time type
#_datetime _datetimemodule.c # datetime accelerator
#_bisect _bisectmodule.c # Bisection algorithms
#_heapq _heapqmodule.c # Heap queue algorithm

View file

@ -25,7 +25,7 @@
* final result fits in a C int (this can be an issue on 64-bit boxes).
*/
#if SIZEOF_INT < 4
# error "datetime.c requires that C int have at least 32 bits"
# error "_datetime.c requires that C int have at least 32 bits"
#endif
#define MINYEAR 1
@ -5086,7 +5086,7 @@ static PyDateTime_CAPI CAPI = {
static struct PyModuleDef datetimemodule = {
PyModuleDef_HEAD_INIT,
"datetime",
"_datetime",
"Fast implementation of the datetime type.",
-1,
module_methods,
@ -5097,7 +5097,7 @@ static struct PyModuleDef datetimemodule = {
};
PyMODINIT_FUNC
PyInit_datetime(void)
PyInit__datetime(void)
{
PyObject *m; /* a module object */
PyObject *d; /* its dict */