add argcargv test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5708 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4e3d516cee
commit
2c15a0a2b1
2 changed files with 43 additions and 0 deletions
20
Examples/test-suite/python/argcargvtest.i
Normal file
20
Examples/test-suite/python/argcargvtest.i
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
%module argcargvtest
|
||||
|
||||
%include <argcargv.i>
|
||||
|
||||
%apply (int ARGC, char **ARGV) { (size_t argc, const char **argv) }
|
||||
|
||||
%inline %{
|
||||
|
||||
int mainc(size_t argc, const char **argv)
|
||||
{
|
||||
return argc;
|
||||
}
|
||||
|
||||
const char* mainv(size_t argc, const char **argv, int idx)
|
||||
{
|
||||
return argv[idx];
|
||||
}
|
||||
|
||||
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue