Kaydet (Commit) b3af1813 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Convert heapq.py to a C implementation.

üst 1021c44b
......@@ -100,7 +100,6 @@ class AllTest(unittest.TestCase):
self.check_all("glob")
self.check_all("gopherlib")
self.check_all("gzip")
self.check_all("heapq")
self.check_all("htmllib")
self.check_all("httplib")
self.check_all("ihooks")
......
......@@ -104,6 +104,8 @@ Extension modules
Library
-------
- heapq.py has been converted to C for improved performance
- traceback.format_exc has been added (similar to print_exc but it returns
a string).
......
......@@ -46,6 +46,7 @@ extern void initxxsubtype(void);
extern void initzipimport(void);
extern void init_random(void);
extern void inititertools(void);
extern void initheapq(void);
/* tools/freeze/makeconfig.py marker for additional "extern" */
/* -- ADDMODULE MARKER 1 -- */
......@@ -98,6 +99,7 @@ struct _inittab _PyImport_Inittab[] = {
{"_weakref", init_weakref},
{"_hotshot", init_hotshot},
{"_random", init_random},
{"heapq", initheapq},
{"itertools", inititertools},
{"xxsubtype", initxxsubtype},
......
......@@ -298,6 +298,10 @@ SOURCE=..\Parser\grammar1.c
# End Source File
# Begin Source File
SOURCE=..\Modules\heapqmodule.c
# End Source File
# Begin Source File
SOURCE=..\Modules\imageop.c
# End Source File
# Begin Source File
......
......@@ -322,6 +322,8 @@ class PyBuildExt(build_ext):
exts.append( Extension("_random", ["_randommodule.c"]) )
# fast iterator tools implemented in C
exts.append( Extension("itertools", ["itertoolsmodule.c"]) )
# heapq
exts.append( Extension("heapq", ["heapqmodule.c"]) )
# operator.add() and similar goodies
exts.append( Extension('operator', ['operator.c']) )
# Python C API test module
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment