From a997938b638a8b9fcac1b8a0d5674fda210734ef Mon Sep 17 00:00:00 2001 From: Mark Gossage Date: Mon, 22 Jan 2007 04:59:16 +0000 Subject: 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 --- Lib/lua/carrays.i | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Lib/lua/carrays.i (limited to 'Lib/lua/carrays.i') 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 for suggesting this +*/ +%rename(__getitem) *::getitem; // the v=X[i] (get operator) +%rename(__setitem) *::setitem; // the X[i]=v (set operator) + +%include <../carrays.i> -- cgit v1.2.1