From: William S F. <ws...@fu...> - 2015-08-29 12:37:39
|
On 29 August 2015 at 11:56, Joel Andersson <j.a...@gm...> wrote: > Hi! > > I'm back working on the MATLAB module. Thanks to everybody's help, I think > we are very close to having an essentially feature complete module. After > debugging the existing features and writing documentation, we should be > ready for a code review. > > I'm now trying to wrap up the support for multiple modules (lots of cred > goes to Don Bigler) and clean up the handling of pointers. > > An issue I have is that the wrapped constructor of a class is called from > the constructor of the MATLAB proxy class. That is, when calling the > constructor, the proxy class has already been created. But, as it works now, > the wrapped constructor will try to return a new proxy class instance. > > Another way to explain it: Currently, the wrapper of the constructor will > work something like: > > foo_proxy = _wrap_new_Foo(constructor_arguments) I'm pretty sure all the language modules work like this, ie a new proxy is created for every pointer obtained from C/C++, so it is quite possible to have multiple proxy classes for one underlying C/C++ object. > But instead I want the proxy class to look like: > > _wrap_new_Foo(foo_proxy, constructor_arguments) > > How can I change the wrapping of constructors this way? > Not possible atm. What are you planning on doing and how will it work? It sounds like some fundamental changes to the SWIG runtime. William |