<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
For global functions, I've found helper with void* + cffi (the way you've<br>
described in your mail) enough.</blockquote><div><br></div><div>Ok, so I think I'm really close to having something working now, except for one thing: I can't figure out how to access/pass a void pointer via cppyy?</div>
<div><br></div><div>If I declare a C++ function/method as taking a "void *" argument, I can't figure out how to construct a Python object/value to pass to it that it will accept (whatever I try (for example, when trying an int, such as what cppyy.addressof returns), I just get "TypeError: 'CPPInstance' object expected, got 'int' instead").. Is there some special way to construct a cppyy "void *" object or something I'm not aware of?</div>
<div><br></div><div>I also noticed when I tried defining a global "void *" variable, like so:</div><div><br></div><div> void *voidp;</div><div><br></div><div>That any attempt to access it from Python yields:<br>
</div><div><br></div><div><div>>>>> cppyy.gbl.voidp</div><div>Traceback (most recent call last):</div><div> File "<stdin>", line 1, in <module></div><div>AttributeError: <class '__main__.::'> object has no attribute 'voidp' (details: no converter available for '')</div>
</div><div><br></div><div><br></div><div>This feels like I must be missing something obvious here..?</div><div><br></div><div>--Alex</div></div></div></div>