Fix bad exit running 'swig -go -help'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13960 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d994d47028
commit
4714b9b897
1 changed files with 3 additions and 1 deletions
|
|
@ -129,6 +129,7 @@ private:
|
|||
virtual void main(int argc, char *argv[]) {
|
||||
|
||||
SWIG_library_directory("go");
|
||||
bool display_help = false;
|
||||
|
||||
// Process command line options.
|
||||
for (int i = 1; i < argc; i++) {
|
||||
|
|
@ -190,6 +191,7 @@ private:
|
|||
Swig_arg_error();
|
||||
}
|
||||
} else if (strcmp(argv[i], "-help") == 0) {
|
||||
display_help = true;
|
||||
Printf(stdout, "%s\n", usage);
|
||||
}
|
||||
}
|
||||
|
|
@ -215,7 +217,7 @@ private:
|
|||
// This test may be removed in the future, when we can assume that
|
||||
// everybody has upgraded to Go 1.1. The code below is prepared
|
||||
// for this test to simply be taken out.
|
||||
if (intgo_type_size == 0) {
|
||||
if (intgo_type_size == 0 && !display_help) {
|
||||
Printf(stderr, "SWIG -go: -intgosize option required but not specified\n");
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue