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



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to