Added a lua specific carrays.i which adds the operator[] support.

modified the main code to make it not emit all the class member functions & accessors

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9642 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Mark Gossage 2007-01-22 04:59:16 +00:00
commit a997938b63
6 changed files with 90 additions and 16 deletions

10
Lib/lua/carrays.i Normal file
View file

@ -0,0 +1,10 @@
/* Small change to the standard carrays.i
renaming the field to __getitem__ & __setitem__
for operator[] access
Thanks to Fabian Franz <FabianFranz@gmx.de> for suggesting this
*/
%rename(__getitem) *::getitem; // the v=X[i] (get operator)
%rename(__setitem) *::setitem; // the X[i]=v (set operator)
%include <../carrays.i>