def test():
    a = swig2_ext.A()
    b = swig2_ext.foo()  # This will be an APtr instance.
    b.thisown = 1  # Prevent memory leaks.
    code = """a->f();
              b->f();
              """
    weave.inline(code, ['a', 'b'], include_dirs=['.'],
                 headers=['"swig2_ext.h"'], verbose=1)
Instantiate the SWIG wrapped object and then call its method
dataset/ETHPy150Open scipy/scipy/scipy/weave/examples/swig2_example.py/test