Author: Maciej Fijalkowski <[email protected]>
Branch: vmprof
Changeset: r75535:df31af4fa024
Date: 2015-01-26 15:48 +0200
http://bitbucket.org/pypy/pypy/changeset/df31af4fa024/
Log: bound-method-or-none is not RPython
diff --git a/pypy/module/_vmprof/interp_vmprof.py
b/pypy/module/_vmprof/interp_vmprof.py
--- a/pypy/module/_vmprof/interp_vmprof.py
+++ b/pypy/module/_vmprof/interp_vmprof.py
@@ -145,7 +145,7 @@
code = weakcode()
if code:
self.register_code(space, code)
- space.set_code_callback(self.register_code)
+ space.set_code_callback(vmprof_register_code)
if we_are_translated():
# does not work untranslated
res = vmprof_enable(fileno, -1, period, 0)
@@ -195,6 +195,12 @@
raise wrap_oserror(space, OSError(rposix.get_saved_errno(),
"_vmprof.disable"))
+def vmprof_register_code(space, code):
+ from pypy.module._vmprof import Module
+ mod_vmprof = space.getbuiltinmodule('_vmprof')
+ assert isinstance(mod_vmprof, Module)
+ mod_vmprof.vmprof.register_code(space, code)
+
@unwrap_spec(fileno=int, period=int)
def enable(space, fileno, period=-1):
from pypy.module._vmprof import Module
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit