[Insight-users] Getting PyObject* through to wrapped C++ code

Bill Hoffman bill . hoffman at kitware . com
Tue, 22 Jul 2003 13:41:22 -0400


I would still rather not have ITK specific code in CableSwig.cxx.
A small helper function might be a better way to go.  Alternatively, 
if you could figure out how to call the swig parser again we could
add .i files to the process as an extra option.

Currently in cableSwigMain.cxx it looks like something like this:

 Node *top = Swig_cparse(cpps);
 CableSwig cswig; 
 cswig.ParseFile(input_file, top, typemap_lang);

It would be good, if Swig_cparse could be called again with a new
.i file that could be processed in the context of the swig setup, and
the CableSwig parse.   

Then we could do something like this;

cswig -swig_extras swig.i wrap_foo.cxx


-Bill

At 01:31 PM 7/22/2003, Charl P. Botha wrote:
>On Tue, Jul 22, 2003 at 06:26:20PM +0200, Charl P. Botha wrote:
>> Embarrassingly enough, I didn't run into SwigExtras.i during my analysis
>> of the wrapping code and solved the problem differently.  Maybe my
>> PREVIOUS patch (the one adding the exception handling for
>> itk::ExceptionObject) can be moved here, which would be much cleaner. 
>> I'm interested to hear your opinion.
>
>Okay, I just checked.  I don't think that my itk::ExceptionObject handler
>changes or my PyObject* passing-through changes can be integrated there.
>
>For the PyObject* thingy I could probably write a helper function in
>SwigExtras.i, but the way I have it now, with a small typemap modification
>in CableSwig.cxx, seems to be better UNTIL there's an easier way to
>configure global typemap changes to CableSwig.
>
>Thanks again,
>Charl
>
>-- 
>charl p. botha http://cpbotha . net/ http://visualisation . tudelft . nl/
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk . org
>http://www . itk . org/mailman/listinfo/insight-users