diff options
author | Alistair Delva <adelva@google.com> | 2024-04-10 14:15:29 -0700 |
---|---|---|
committer | Alistair Delva <adelva@google.com> | 2024-04-11 12:58:28 -0700 |
commit | d0f0f90be16c2ac553b5fa08512045273135147a (patch) | |
tree | 5d9ebb7a04807ea8a609ddd18b0162bc87530e4b /Examples/test-suite/argcargvtest.i | |
parent | 6ffc1dbf29ba98c4d8aa71ebc9b484e973fe1030 (diff) | |
download | swig-d0f0f90be16c2ac553b5fa08512045273135147a.tar.gz |
Change-Id: I47cef2be94299220d80265d949a95b58eee2c23b
Diffstat (limited to 'Examples/test-suite/argcargvtest.i')
-rw-r--r-- | Examples/test-suite/argcargvtest.i | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Examples/test-suite/argcargvtest.i b/Examples/test-suite/argcargvtest.i index ed5aa0985..a00dee177 100644 --- a/Examples/test-suite/argcargvtest.i +++ b/Examples/test-suite/argcargvtest.i @@ -1,8 +1,10 @@ %module argcargvtest +#ifndef SWIGOCAML %include <argcargv.i> %apply (int ARGC, char **ARGV) { (size_t argc, const char **argv) } +#endif %inline %{ @@ -13,7 +15,7 @@ int mainc(size_t argc, const char **argv) const char* mainv(size_t argc, const char **argv, int idx) { - return argv[idx]; + return argv[idx] ? argv[idx] : "<<NULL>>"; } void initializeApp(size_t argc, const char **argv, bool setPGid = true, bool isMakeline = false) |