[Go] Make -intgosize optional

We no longer support Go < 1.2 so we can default intgo to ptrdiff_t
and uintgo to size_t.

Fixes #683
Fixes #2233
This commit is contained in:
Olly Betts 2022-03-16 09:41:11 +13:00
commit 2da3815f99
5 changed files with 9 additions and 27 deletions

View file

@ -351,14 +351,6 @@ private:
Preprocessor_define("SWIGGO_GCCGO 1", 0);
}
// 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 && !display_help) {
Printf(stderr, "SWIG -go: -intgosize option required but not specified\n");
Exit(EXIT_FAILURE);
}
if (intgo_type_size == 32) {
Preprocessor_define("SWIGGO_INTGO_SIZE 32", 0);
} else if (intgo_type_size == 64) {