| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I've been using this patch for the past couple of weeks and overall it's worked well for me, but I did discover that in CallPythonCallable, stomping Stack.OutParms was the wrong thing to do (seems really obvious in retrospect, but oh well). Basically, we do need to track the out param property addresses as we read them off the stack, but the caller's stack might have out params too, so it was wrong to null that list. But we can't just add to that list In the latest commit I changed it so that inside of CallPythonCallable we make a "local" list of out params, and then when we go to look for out param we check Stack.OutParms, then our local list if it wasn't found. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
See issue #621 - this patch makes it so that Python can properly call C++ or BP methods with one or more output parameters as well as C++ methods that have both output parameters and a return value. Further, it makes it so that in Python you can override and implement methods that have both return values and output parameters. A side effect of this patch is that so far it appears to have fixed #622.
Note that when combining out params and a return value, the return value needs to come last in the type annotation info, e.g. given a C++ base class method like this:
you'd implement it in Python like this:
In terms of lines of code, the biggest change is moving property creation to new_property_from_pyobject since it is needed in more places (and was getting unwieldy anyway).
Given that this patch affects some pretty fundamental code, I also created a project that runs through a large set of test scenarios: https://github.com/dfb/uepy_test_prjs/tree/master/output_params