[Lldb-commits] [PATCH] D68546: remove FILE* usage from ReportEventState() and HandleProcessEvent()

Lawrence D'Anna via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 7 16:44:58 PDT 2019


lawrence_danna added a comment.

In D68546#1697302 <https://reviews.llvm.org/D68546#1697302>, @labath wrote:

> Adding Jim for the API design aspects.
>
> It's unfortunate that we have to add the FileSP overload (and the associated cruft) to every API that used to take a FILE*. I take it that is needed to get rid of the swig typemaps? Is there any way to avoid it?


I think at the swig level there really does need to be two, because they're doing two different things.   The FileSP version takes a python file object and converts it, and then passes it in.    This should have the same behavior as the old FILE* binding.    The SBFile takes a file that has already been converted -- possibly with the `borrow` or `force_io_methods` flags set, and passes that in directly, without doing further conversion.

I could take the duplicates out of the `.h` and `.cpp` files, and use `%extend` to add them back in in the `.i` files.   Is that cleaner?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68546/new/

https://reviews.llvm.org/D68546





More information about the lldb-commits mailing list