Rev 189: Expose add_special_size, and update CHANGES.txt in http://bazaar.launchpad.net/~jameinel/meliae/special_cases
John Arbash Meinel
john at arbash-meinel.com
Tue Aug 10 17:20:16 BST 2010
At http://bazaar.launchpad.net/~jameinel/meliae/special_cases
------------------------------------------------------------
revno: 189
revision-id: john at arbash-meinel.com-20100810162009-62a3o1k0j1x8did3
parent: john at arbash-meinel.com-20100810161419-nmro8gtc3nxyhrbh
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: special_cases
timestamp: Tue 2010-08-10 11:20:09 -0500
message:
Expose add_special_size, and update CHANGES.txt
-------------- next part --------------
=== modified file 'CHANGES.txt'
--- a/CHANGES.txt 2010-08-09 16:13:08 +0000
+++ b/CHANGES.txt 2010-08-10 16:20:09 +0000
@@ -25,6 +25,15 @@
The main win is lowering memory consumption. A 50k parent list takes
200kB by itself (on 32-bit). (John Arbash Meinel)
+* Fix a PyInt memory leak. We were calling __sizeof__ which returns an
+ PyInt and not DECREFing it. (John Arbash Meinel)
+
+* Initial support for overriding ``__sizeof__`` definitions. It turns
+ out that object has a basic definition, so all new style classes
+ inherit it. We now provide ``meliae.scanner.add_special_size``, which
+ takes a type name and some callbacks to determine the size of an
+ object. This lets you register them without importing the module.
+
Meliae 0.3
##########
=== modified file 'meliae/scanner.py'
--- a/meliae/scanner.py 2010-07-12 22:28:03 +0000
+++ b/meliae/scanner.py 2010-08-10 16:20:09 +0000
@@ -25,6 +25,7 @@
size_of = _scanner.size_of
get_referents = _scanner.get_referents
+add_special_size = _scanner.add_special_size
def dump_all_referenced(outf, obj, is_pending=False):
More information about the bazaar-commits
mailing list