[Lldb-commits] [lldb] [lldb][api-test] Add API test for SBCommandInterpreter::CommandOverrideCallback (PR #94518)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 6 10:57:20 PDT 2024
================
@@ -476,6 +475,32 @@ template <> bool SetNumberFromPyObject<double>(double &number, PyObject *obj) {
$1 = $1 || PyCallable_Check(reinterpret_cast<PyObject *>($input));
}
+%typemap(in) (lldb::CommandOverrideCallback callback, void *baton) {
+ if (!($input == Py_None ||
+ PyCallable_Check(reinterpret_cast<PyObject *>($input)))) {
+ PyErr_SetString(PyExc_TypeError, "Need a callable object or None!");
+ SWIG_fail;
+ }
+
+ // FIXME (filcab): We can't currently check if our callback is already
----------------
bulbazord wrote:
I'd say remove the FIXME entirely, it shouldn't apply to this.
As a side note, I think in the LLVM project we generally discourage the pattern of `FIXME (name)` and `TODO (name)`. Maybe we should go clean up the original instance too? :p
https://github.com/llvm/llvm-project/pull/94518
More information about the lldb-commits
mailing list