diff options
author | Mark Gossage <mark@gossage.cjb.net> | 2007-01-22 04:59:16 +0000 |
---|---|---|
committer | Mark Gossage <mark@gossage.cjb.net> | 2007-01-22 04:59:16 +0000 |
commit | a997938b638a8b9fcac1b8a0d5674fda210734ef (patch) | |
tree | 948d57da94b0ade035ecb1632a348ae8d030a5bc /Lib/lua/carrays.i | |
parent | 5d0c155688e2d8bba41f7113d5316334a91aa5b7 (diff) | |
download | swig-a997938b638a8b9fcac1b8a0d5674fda210734ef.tar.gz |
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
Diffstat (limited to 'Lib/lua/carrays.i')
-rw-r--r-- | Lib/lua/carrays.i | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/lua/carrays.i b/Lib/lua/carrays.i new file mode 100644 index 000000000..7c8e3d517 --- /dev/null +++ b/Lib/lua/carrays.i @@ -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> |