From 7804d39b22ac32bb40aa8d4f08d2d07e386cb425 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 27 Feb 2006 04:12:08 +0000 Subject: [PATCH] add argc,argv typemap for ruby git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8903 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/CHANGES.current | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/SWIG/CHANGES.current b/SWIG/CHANGES.current index 3468369e8..daea9c6d1 100644 --- a/SWIG/CHANGES.current +++ b/SWIG/CHANGES.current @@ -3,7 +3,28 @@ Version 1.3.29 (In progress) 02/26/2006: mmatus [Ruby] add argcargv.i library file. + + Use it as follow: + %include argcargv.i + + %apply (int ARGC, char **ARGV) { (size_t argc, const char **argv) } + + %inline { + int mainApp(size_t argc, const char **argv) + { + return argc; + } + } + + then in the ruby side: + + args = ["asdf", "asdf2"] + n = mainApp(args); + + + This is the similar to the python version Lib/python/argcargv.i + 02/24/2006: mgossage Small update Lua documents on troubleshooting problems