add argc,argv typemap for ruby
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8903 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a36bb2c1ab
commit
7804d39b22
1 changed files with 21 additions and 0 deletions
|
|
@ -3,7 +3,28 @@ Version 1.3.29 (In progress)
|
||||||
02/26/2006: mmatus
|
02/26/2006: mmatus
|
||||||
|
|
||||||
[Ruby] add argcargv.i library file.
|
[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
|
02/24/2006: mgossage
|
||||||
|
|
||||||
Small update Lua documents on troubleshooting problems
|
Small update Lua documents on troubleshooting problems
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue