|
Bug in typemaps?: msg#00189programming.swig
Dear All, I think I may have found a small bug in the way typemaps work in swig-1.3.22. I have the following interface file (AddOne.i): %module AddOne %{ #include "AddOne.h" %} %include <typemaps.i> extern inline void AddOne(double* INOUT, double* INOUT, double* INOUT); And the corresponding header file is (AddOne.h): #ifndef __ADDONE_H #define __ADDONE_H inline void AddOne(double* a, double* b, double* c) { *a += 1; *b += 1; *c += 1; } #endif To create the library I typed the following: swig -python -modern -c++ AddOne.i g++ -o _AddOne.so -shared AddOne_wrap.cxx -I/usr/include/python2.3 Now when I run python I get the following: thrush% python Python 2.3.3 (#1, Mar 24 2004, 14:06:15) [GCC 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import AddOne >>> AddOne.AddOne(2, 3, 4) ((3.0, 4.0), 5.0) >>> The result should be (3.0, 4.0, 5.0) shouldn't it and NOT ((3.0, 4.0), 5.0)? I have checked with swig-1.3.21 and the correct result is obtained. Thanks, Raghavendra _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: SWIG runtime libs/Python distutils combo on Mac: 00189, Bob Ippolito |
|---|---|
| Next by Date: | How to emove prefix from classes?: 00189, Raghavendra Chandrashekara |
| Previous by Thread: | NULL pointers and None typei: 00189, Alexander Tournier |
| Next by Thread: | Re: Bug in typemaps?: 00189, Marcelo Matus |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |