|
Re: Preventing a user to refer to non-existent struct members: msg#00132programming.swig
Ok, I have a feature working that prevents the to refer to non-existent struct members, but I need help with the name. Please check this documentation, and if everyone is happy with the "static" name, I'll use it. If not, please suggest a better one. Marcelo /* Use the "static" feature to make a wrapped class behaves as a "static" one, ie, a python class that doesn't dynamically add new attributes. For example, for the class %feature("static") A; struct A { int a; int b; }; you will get: aa = A() aa.a = 1 # Ok aa.b = 1 # Ok aa.c = 3 # error Since "static" is a feature, if you use it like %feature("static"); it will make all the wrapped classes static ones. The implementation is based on the recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252158 and works for modern (-modern) and plain python. */ _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: wrapping static libraries: 00132, Scott Murman |
|---|---|
| Next by Date: | (no subject): 00132, Bryga 66 |
| Previous by Thread: | Re: Preventing a user to refer to non-existent struct membersi: 00132, Josh Cherry |
| Next by Thread: | Re: Preventing a user to refer to non-existent struct members: 00132, Robert Lupton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |