================
@@ -671,6 +736,20 @@ class ScriptedPythonInterface : virtual public 
ScriptedInterface {
     original_arg = ExtractValueFromPythonObject<T>(transformed_arg, error);
   }
 
+  // Read-only types: Python doesn't modify these, so reverse transform is a
+  // no-op.
+  void ReverseTransform(ModuleSpec &original_arg,
+                        python::PythonObject transformed_arg, Status &error) {}
+
+  void ReverseTransform(FileSpecList &original_arg,
+                        python::PythonObject transformed_arg, Status &error) {}
+
+  void ReverseTransform(std::string &original_arg,
+                        python::PythonObject transformed_arg, Status &error) {}
+
+  void ReverseTransform(lldb::ModuleSP &original_arg,
+                        python::PythonObject transformed_arg, Status &error) {}
+
----------------
medismailben wrote:

These are read-only for the your affordance but another affordance might expect 
it to be in-out parameters so having it be a no-op could be a source of bugs. 
Here, you only need to implement the `std::string &original_arg` overload. For 
`ModuleSpec`, `FileSpecList` & `ModuleSP` you need to implement 
`ExtractValueFromPythonObject` like you did for `FileSpec`. Thanks!

https://github.com/llvm/llvm-project/pull/181334
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to