|
Preventing a user to refer to non-existent struct members: msg#00106programming.swig
I've found that a fruitful source of bugs is setting (at the python level) non-existent elements in C-level structs. I can avoid this (in python 2.3 at least) by setting __slots__ in the class definition to the C-level members (i.e. .__swig_getmethods__.keys()). Unfortunately, I don't see how I can do this without post-processing the swig-generated interface.py file. Is there a trick known to the cognoscenti? Or is there a better way of doing this? R _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | method returning a string insted of a pointer: 00106, Claudio Battaglino |
|---|---|
| Next by Date: | Re: Preventing a user to refer to non-existent struct members: 00106, Marcelo Matus |
| Previous by Thread: | method returning a string insted of a pointeri: 00106, Claudio Battaglino |
| Next by Thread: | Re: Preventing a user to refer to non-existent struct members: 00106, Marcelo Matus |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |