|
NULL pointers and None type: msg#00184programming.swig
Hi, Have a small problem here: I've built an iterator: class Iterator { public: Iterator(CObject &O); void Next(void); CObject * Obj; }; inline Iterator::Iterator(CObject &O) {Obj = &O;} inline void Iterator::Next(void) {Obj = Obj->Next;} That's fine: but then I would like to be able to feed it a NULL pointer or a None statement so that Obj would just point to NULL. >> I = Iterator(None) I guess I could test before feeding the iterator anything, just wondering if there was a solution? Any ideas??? Thanks Alex -- ---------------------------- Alexander L. Tournier, PhD Cancer Research UK Lincoln's Inn Fields LONDON Tel: 0207 269 3583 Fax: 0207 269 3258 _______________________________________________ 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+Perl+C free() error and zero pointer on very simple script Bug # 1035817: 00184, William S Fulton |
|---|---|
| Next by Date: | Re: NULL pointers and None type: 00184, Marcelo Matus |
| Previous by Thread: | SWIG+Perl+C free() error and zero pointer on very simple script Bug # 1035817i: 00184, Bryga 66 |
| Next by Thread: | Re: NULL pointers and None type: 00184, Marcelo Matus |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |