<div dir="ltr">+enrico<div><br></div><div>I actually didn't even get that far, because it was failing on the second argument, the void* buffer. I tried using ctypes.create_string_buffer and passing that in, but that wasn't working either. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 6, 2014 at 11:29 AM, <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Enrico is the man for this sort of thing, but as I understand it, fancy argument conversions from the SB API's into Python methods are governed by %typemap swig directives, there are a bunch of these in scripts/Python/python-typemaps.swig. But swig has default handling for C++ references, so I would imagine that you just make a python variable initialized to some ConnectionStatus enum value, and then pass that in. Does that not work?<br>
<br>
Jim<br>
<div><div class="h5"><br>
<br>
<br>
<br>
> On Oct 2, 2014, at 6:00 PM, Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br>
><br>
> When public methods take complex arguments like char*'s that get written into, parameters passed by reference, etc, how do we know what syntax to call them with from Python?<br>
><br>
> For example, consider this method:<br>
><br>
> size_t<br>
> SBCommunication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, ConnectionStatus &status)<br>
><br>
> The first argument is a buffer that gets written to. The last argument is a ConnectionStatus that gets passed by reference. In lldb, I'm doing the following:<br>
><br>
> >>> comm = lldb.SBCommunication("test")<br>
> >>> comm.Connect("file://d:\\file1.cpp")<br>
> >>> comm.Read(?????)<br>
><br>
> How do I write this so that it works?<br>
</div></div>> _______________________________________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br>
</blockquote></div><br></div>