mirror of https://github.com/python/cpython
Prepare collections module for pure python code entries.
This commit is contained in:
parent
3035d2397f
commit
eb9798892d
|
@ -0,0 +1,3 @@
|
||||||
|
__all__ = ['deque', 'defaultdict']
|
||||||
|
|
||||||
|
from _collections import deque, defaultdict
|
|
@ -1337,11 +1337,11 @@ PyDoc_STRVAR(module_doc,
|
||||||
");
|
");
|
||||||
|
|
||||||
PyMODINIT_FUNC
|
PyMODINIT_FUNC
|
||||||
initcollections(void)
|
init_collections(void)
|
||||||
{
|
{
|
||||||
PyObject *m;
|
PyObject *m;
|
||||||
|
|
||||||
m = Py_InitModule3("collections", NULL, module_doc);
|
m = Py_InitModule3("_collections", NULL, module_doc);
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -43,7 +43,7 @@ extern void initxxsubtype(void);
|
||||||
extern void initzipimport(void);
|
extern void initzipimport(void);
|
||||||
extern void init_random(void);
|
extern void init_random(void);
|
||||||
extern void inititertools(void);
|
extern void inititertools(void);
|
||||||
extern void initcollections(void);
|
extern void init_collections(void);
|
||||||
extern void init_heapq(void);
|
extern void init_heapq(void);
|
||||||
extern void init_bisect(void);
|
extern void init_bisect(void);
|
||||||
extern void init_symtable(void);
|
extern void init_symtable(void);
|
||||||
|
@ -124,7 +124,7 @@ struct _inittab _PyImport_Inittab[] = {
|
||||||
{"_heapq", init_heapq},
|
{"_heapq", init_heapq},
|
||||||
{"_lsprof", init_lsprof},
|
{"_lsprof", init_lsprof},
|
||||||
{"itertools", inititertools},
|
{"itertools", inititertools},
|
||||||
{"collections", initcollections},
|
{"_collections", init_collections},
|
||||||
{"_symtable", init_symtable},
|
{"_symtable", init_symtable},
|
||||||
{"mmap", initmmap},
|
{"mmap", initmmap},
|
||||||
{"_csv", init_csv},
|
{"_csv", init_csv},
|
||||||
|
|
|
@ -458,7 +458,7 @@
|
||||||
RelativePath="..\Objects\codeobject.c">
|
RelativePath="..\Objects\codeobject.c">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\Modules\collectionsmodule.c">
|
RelativePath="..\Modules\_collectionsmodule.c">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\Python\compile.c">
|
RelativePath="..\Python\compile.c">
|
||||||
|
|
|
@ -1381,7 +1381,7 @@
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\Modules\collectionsmodule.c"
|
RelativePath="..\Modules\_collectionsmodule.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -370,7 +370,7 @@ class PyBuildExt(build_ext):
|
||||||
# fast iterator tools implemented in C
|
# fast iterator tools implemented in C
|
||||||
exts.append( Extension("itertools", ["itertoolsmodule.c"]) )
|
exts.append( Extension("itertools", ["itertoolsmodule.c"]) )
|
||||||
# high-performance collections
|
# high-performance collections
|
||||||
exts.append( Extension("collections", ["collectionsmodule.c"]) )
|
exts.append( Extension("_collections", ["_collectionsmodule.c"]) )
|
||||||
# bisect
|
# bisect
|
||||||
exts.append( Extension("_bisect", ["_bisectmodule.c"]) )
|
exts.append( Extension("_bisect", ["_bisectmodule.c"]) )
|
||||||
# heapq
|
# heapq
|
||||||
|
|
Loading…
Reference in New Issue