[Zope-Checkins] SVN: Zope/branches/zeomega-2.11-memory-fixes/lib/python/Shared/DC/ZRDB/Results.py Changed the class declaration inside the record_cls_factory to use the builtin 'type' class constructor to avoid any chance of outer scope references leaking in closure-style (this is probably over paranoid but it can't hurt).
Brad Allen
brad at allendev.com
Tue Feb 2 19:47:07 EST 2010
Log message for revision 108729:
Changed the class declaration inside the record_cls_factory to use the builtin 'type' class constructor to avoid any chance of outer scope references leaking in closure-style (this is probably over paranoid but it can't hurt).
Changed:
U Zope/branches/zeomega-2.11-memory-fixes/lib/python/Shared/DC/ZRDB/Results.py
-=-
Modified: Zope/branches/zeomega-2.11-memory-fixes/lib/python/Shared/DC/ZRDB/Results.py
===================================================================
--- Zope/branches/zeomega-2.11-memory-fixes/lib/python/Shared/DC/ZRDB/Results.py 2010-02-02 23:08:18 UTC (rev 108728)
+++ Zope/branches/zeomega-2.11-memory-fixes/lib/python/Shared/DC/ZRDB/Results.py 2010-02-03 00:47:07 UTC (rev 108729)
@@ -10,6 +10,8 @@
# FOR A PARTICULAR PURPOSE
#
##############################################################################
+
+
import ExtensionClass
from Acquisition import Implicit
from Record import Record
@@ -25,10 +27,7 @@
"""Return a custom 'record' class inheriting from Record, Implicit,
brains, and zbrains).
"""
- # alternate implementation
- # r = type('r', (Record, Implicit, brains, zbrains), {})
- class r(Record, Implicit, brains, zbrains):
- 'Result record class'
+ r = type('r', (Record, Implicit, brains, zbrains), {})
# The Record class needs a __record_schema__ ...why?
r.__record_schema__=schema
More information about the Zope-Checkins
mailing list