From: Raymond Hettinger Date: Wed, 28 Feb 2007 18:37:52 +0000 (+0000) Subject: Prepare collections module for pure python code entries. X-Git-Tag: v2.6a1~2124 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb9798892d7ed54762ae006e39db0a84f671cfd3;p=thirdparty%2FPython%2Fcpython.git Prepare collections module for pure python code entries. --- diff --git a/Lib/collections.py b/Lib/collections.py new file mode 100644 index 000000000000..0d9254c9a748 --- /dev/null +++ b/Lib/collections.py @@ -0,0 +1,3 @@ +__all__ = ['deque', 'defaultdict'] + +from _collections import deque, defaultdict diff --git a/Modules/collectionsmodule.c b/Modules/_collectionsmodule.c similarity index 99% rename from Modules/collectionsmodule.c rename to Modules/_collectionsmodule.c index f98bd490323d..c37f9ace1574 100644 --- a/Modules/collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -1337,11 +1337,11 @@ PyDoc_STRVAR(module_doc, "); PyMODINIT_FUNC -initcollections(void) +init_collections(void) { PyObject *m; - m = Py_InitModule3("collections", NULL, module_doc); + m = Py_InitModule3("_collections", NULL, module_doc); if (m == NULL) return; diff --git a/PC/config.c b/PC/config.c index a9a280ded105..e1b52a4f232b 100644 --- a/PC/config.c +++ b/PC/config.c @@ -43,7 +43,7 @@ extern void initxxsubtype(void); extern void initzipimport(void); extern void init_random(void); extern void inititertools(void); -extern void initcollections(void); +extern void init_collections(void); extern void init_heapq(void); extern void init_bisect(void); extern void init_symtable(void); @@ -124,7 +124,7 @@ struct _inittab _PyImport_Inittab[] = { {"_heapq", init_heapq}, {"_lsprof", init_lsprof}, {"itertools", inititertools}, - {"collections", initcollections}, + {"_collections", init_collections}, {"_symtable", init_symtable}, {"mmap", initmmap}, {"_csv", init_csv}, diff --git a/PCbuild/pythoncore.vcproj b/PCbuild/pythoncore.vcproj index 9f59cf42e3eb..50e51f7aeed4 100644 --- a/PCbuild/pythoncore.vcproj +++ b/PCbuild/pythoncore.vcproj @@ -458,7 +458,7 @@ RelativePath="..\Objects\codeobject.c"> + RelativePath="..\Modules\_collectionsmodule.c"> diff --git a/PCbuild8/pythoncore.vcproj b/PCbuild8/pythoncore.vcproj index f3358792fb6d..16a250e5fce0 100644 --- a/PCbuild8/pythoncore.vcproj +++ b/PCbuild8/pythoncore.vcproj @@ -1381,7 +1381,7 @@ >