]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Prepare collections module for pure python code entries.
authorRaymond Hettinger <python@rcn.com>
Wed, 28 Feb 2007 18:37:52 +0000 (18:37 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 28 Feb 2007 18:37:52 +0000 (18:37 +0000)
Lib/collections.py [new file with mode: 0644]
Modules/_collectionsmodule.c [moved from Modules/collectionsmodule.c with 99% similarity]
PC/config.c
PCbuild/pythoncore.vcproj
PCbuild8/pythoncore.vcproj
setup.py

diff --git a/Lib/collections.py b/Lib/collections.py
new file mode 100644 (file)
index 0000000..0d9254c
--- /dev/null
@@ -0,0 +1,3 @@
+__all__ = ['deque', 'defaultdict']
+
+from _collections import deque, defaultdict
similarity index 99%
rename from Modules/collectionsmodule.c
rename to Modules/_collectionsmodule.c
index f98bd490323dcd2db35f44ee1f1cb51ae052ffe9..c37f9ace157479bcd55358deff06eb0fa378bcdd 100644 (file)
@@ -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;
 
index a9a280ded1058dd058dbba268199ffdfc880fb4f..e1b52a4f232b63b5c8751309ad0be624af7c7761 100644 (file)
@@ -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},
index 9f59cf42e3eb61b29e05889ea179d5ad5eccdc7d..50e51f7aeed4167060ec067860f2907fc56f7d00 100644 (file)
                        RelativePath="..\Objects\codeobject.c">
                </File>
                <File
-                       RelativePath="..\Modules\collectionsmodule.c">
+                       RelativePath="..\Modules\_collectionsmodule.c">
                </File>
                <File
                        RelativePath="..\Python\compile.c">
index f3358792fb6df01dac74f83ea8e526b908eb2fa3..16a250e5fce06522a0d3b8d983d4ee66469e17cf 100644 (file)
                        >
                </File>
                <File
-                       RelativePath="..\Modules\collectionsmodule.c"
+                       RelativePath="..\Modules\_collectionsmodule.c"
                        >
                </File>
                <File
index 32ea77aeed204307851fc6084923a2b8fbcd5bfb..98d0e97521487310218ae89c62fee8928b55a1ba 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -370,7 +370,7 @@ class PyBuildExt(build_ext):
         # fast iterator tools implemented in C
         exts.append( Extension("itertools", ["itertoolsmodule.c"]) )
         # high-performance collections
-        exts.append( Extension("collections", ["collectionsmodule.c"]) )
+        exts.append( Extension("_collections", ["_collectionsmodule.c"]) )
         # bisect
         exts.append( Extension("_bisect", ["_bisectmodule.c"]) )
         # heapq