[Go] Add missing newlines for goin typemaps
In some cases the \n was missing from goin directives in some places.
Without this change, you will get
} swig_r = (int)(C....
in the output in some cases, and that won't compile in Go, it will
error with:
../gensio/gensio.go:1508:3: expected ';', found swig_r
It only did this on director callbacks with godirectorin, and only if
the virtual function wasn't assigned to zero. So the following will
fail:
class callbacks {
public:
virtual bool call1(int v, const char * const *strarray);
virtual ~callbacks() = default;
};
but the following won't:
class callbacks {
public:
virtual bool call1(int v, const char * const *strarray) = 0;
virtual ~callbacks() = default;
};
Add "\n" to the proper places to fix this.
This commit is contained in:
parent
6043554c38
commit
fb4c69b4b0
1 changed files with 2 additions and 2 deletions
|
|
@ -3518,7 +3518,7 @@ private:
|
|||
goin = Copy(goin);
|
||||
Replaceall(goin, "$input", ln);
|
||||
Replaceall(goin, "$result", ivar);
|
||||
Printv(f_go_wrappers, goin, NULL);
|
||||
Printv(f_go_wrappers, goin, "\n", NULL);
|
||||
Delete(goin);
|
||||
}
|
||||
|
||||
|
|
@ -3772,7 +3772,7 @@ private:
|
|||
goin = Copy(goin);
|
||||
Replaceall(goin, "$input", ln);
|
||||
Replaceall(goin, "$result", ivar);
|
||||
Printv(f_go_wrappers, goin, NULL);
|
||||
Printv(f_go_wrappers, goin, "\n", NULL);
|
||||
Delete(goin);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue