From 6eb31e7391d27fc4a78122d45138e51eae9d6743 Mon Sep 17 00:00:00 2001 From: Filipe Cabecinhas Date: Wed, 22 Aug 2012 13:25:10 +0000 Subject: Added a typemap and wrappers for SBInputReader callbacks Now it's possible to use SBInputReader callbacks in Python. We leak the callback object, unfortunately. A __del__ method can be added to SBInputReader, but we have no way to check the callback function that is on the reader. So we can't call Py_DECREF on it when we have our PythonCallback function. One way to do it is to assume that reified SBInputReaders always have a Python callback (and always call Py_DECREF). Another one is to add methods or properties to SBInputReader (or make the m_callback_function property public). llvm-svn: 162356 --- lldb/test/python_api/default-constructor/sb_inputreader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lldb/test/python_api/default-constructor') diff --git a/lldb/test/python_api/default-constructor/sb_inputreader.py b/lldb/test/python_api/default-constructor/sb_inputreader.py index 9b94a12a7e3..6996059dc51 100644 --- a/lldb/test/python_api/default-constructor/sb_inputreader.py +++ b/lldb/test/python_api/default-constructor/sb_inputreader.py @@ -6,7 +6,10 @@ import sys import lldb def fuzz_obj(obj): - obj.Initialize(lldb.SBDebugger.Create(), None, None, 0, "$", "^", True) + try: + obj.Initialize(lldb.SBDebugger.Create(), None, 0, "$", "^", True) + except Exception: + pass obj.IsActive() obj.IsDone() obj.SetIsDone(True) -- cgit v1.2.3