[pypy-commit] pypy gc-hooks: this is a wrapped class now, better to use the w_* naming convention
antocuni
pypy.commits at gmail.com
Thu Apr 5 08:53:21 EDT 2018
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: gc-hooks
Changeset: r94251:1298b7800106
Date: 2018-04-05 14:29 +0200
http://bitbucket.org/pypy/pypy/changeset/1298b7800106/
Log: this is a wrapped class now, better to use the w_* naming convention
diff --git a/pypy/module/gc/hook.py b/pypy/module/gc/hook.py
--- a/pypy/module/gc/hook.py
+++ b/pypy/module/gc/hook.py
@@ -11,25 +11,25 @@
def __init__(self, space):
self.space = space
- self.hooks = space.fromcache(W_AppLevelHooks)
+ self.w_hooks = space.fromcache(W_AppLevelHooks)
def is_gc_minor_enabled(self):
- return self.hooks.gc_minor_enabled
+ return self.w_hooks.gc_minor_enabled
def is_gc_collect_step_enabled(self):
- return self.hooks.gc_collect_step_enabled
+ return self.w_hooks.gc_collect_step_enabled
def is_gc_collect_enabled(self):
- return self.hooks.gc_collect_enabled
+ return self.w_hooks.gc_collect_enabled
def on_gc_minor(self, total_memory_used, pinned_objects):
- action = self.hooks.gc_minor
+ action = self.w_hooks.gc_minor
action.total_memory_used = total_memory_used
action.pinned_objects = pinned_objects
action.fire()
def on_gc_collect_step(self, oldstate, newstate):
- action = self.hooks.gc_collect_step
+ action = self.w_hooks.gc_collect_step
action.oldstate = oldstate
action.newstate = newstate
action.fire()
@@ -37,7 +37,7 @@
def on_gc_collect(self, count, arenas_count_before, arenas_count_after,
arenas_bytes, rawmalloc_bytes_before,
rawmalloc_bytes_after):
- action = self.hooks.gc_collect
+ action = self.w_hooks.gc_collect
action.count = count
action.arenas_count_before = arenas_count_before
action.arenas_count_after = arenas_count_after
More information about the pypy-commit
mailing list