|
Null reference: msg#00148programming.swig
Hello all, I ran into a problem, but not sure whether it is a SWIG or Python problem. This is a simplest class with operator == defined: // v.h class v { public: v(const int a) : data(a) {} bool operator==(const v& u) const {return data == u.data;} int data; }; % python Python 2.2.2 (#1, Feb 10 2003, 00:23:53) [GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mod >>> None in (mod.v(1), None) Traceback (most recent call last): File "<stdin>", line 1, in ? File "mod.py", line 38, in __eq__ def __eq__(*args): return apply(_mod.v___eq__,args) TypeError: null reference This error does not occur if operator == is not defined. Why == is called here anyway? Could anyone help? Thanks. Zhong _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Directors and typemap(in) const TYPE&: 00148, Marcelo Matus |
|---|---|
| Next by Date: | Re: Null reference: 00148, David Beazley |
| Previous by Thread: | Directors .h file placement.i: 00148, Kerim Borchaev |
| Next by Thread: | Re: Null reference: 00148, David Beazley |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |