Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r67815:69bc27908b13 Date: 2013-11-03 20:01 +0100 http://bitbucket.org/pypy/pypy/changeset/69bc27908b13/
Log: Add __pypy__.debug_flush() to request a debug_flush from app-level explicitly. diff --git a/pypy/module/__pypy__/__init__.py b/pypy/module/__pypy__/__init__.py --- a/pypy/module/__pypy__/__init__.py +++ b/pypy/module/__pypy__/__init__.py @@ -69,6 +69,7 @@ 'debug_print' : 'interp_debug.debug_print', 'debug_stop' : 'interp_debug.debug_stop', 'debug_print_once' : 'interp_debug.debug_print_once', + 'debug_flush' : 'interp_debug.debug_flush', 'builtinify' : 'interp_magic.builtinify', 'lookup_special' : 'interp_magic.lookup_special', 'do_what_I_mean' : 'interp_magic.do_what_I_mean', diff --git a/pypy/module/__pypy__/interp_debug.py b/pypy/module/__pypy__/interp_debug.py --- a/pypy/module/__pypy__/interp_debug.py +++ b/pypy/module/__pypy__/interp_debug.py @@ -23,3 +23,8 @@ debug_start(space, category) debug_print(space, args_w) debug_stop(space, category) + + +@jit.dont_look_inside +def debug_flush(space): + debug.debug_flush() diff --git a/pypy/module/__pypy__/test/test_debug.py b/pypy/module/__pypy__/test/test_debug.py --- a/pypy/module/__pypy__/test/test_debug.py +++ b/pypy/module/__pypy__/test/test_debug.py @@ -43,3 +43,8 @@ ('debug_print', 'hello world'), ]) ]) + + def test_debug_flush(self): + from __pypy__ import debug_flush + debug_flush() + # assert did not crash _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit