[Zope3-checkins] CVS: Zope3 - setup.py:1.26
Jim Fulton
jim@zope.com
Sun, 18 May 2003 14:04:26 -0400
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv8898
Modified Files:
setup.py
Log Message:
Added a simple hooking mechanism.
See the doc string in __init__.py.
This has three advantages over the older hooking mechanism:
1. It is simpler to write hookable functions. You don't need to write
a seprate function that just dispatches to the hook.
2. When analyzing profile data, you will see the actual callers of the
hook function. Before, the hook function would only have the
dispatcher as a caller (unless other functions called it directly
without going through the dispatcher).
3. There is a small performance benefit, because the dispatcher is in
C, rather than Python. In the long run, I suspect that this will
save about 1-2 percent of execution time.
=== Zope3/setup.py 1.25 => 1.26 ===
--- Zope3/setup.py:1.25 Thu May 15 15:07:44 2003
+++ Zope3/setup.py Sun May 18 14:03:55 2003
@@ -237,6 +237,10 @@
["src/zope/interface/_zope_interface_ospec.c"],
include_dirs = include_dirs,
depends = []),
+ Extension("zope.hookable._zope_hookable",
+ ["src/zope/hookable/_zope_hookable.c"],
+ include_dirs = include_dirs,
+ depends = []),
]
# On Window, there are more extensions that need to be built