[Go] Fix handling of C type "long" on 32-bit systems. It was broken
for C++ long& and for big-endian systems in general.
This commit is contained in:
parent
f2dc3a9c1f
commit
fa9a6d58ed
2 changed files with 8 additions and 2 deletions
|
|
@ -48,14 +48,17 @@
|
|||
const unsigned short &,
|
||||
const int &,
|
||||
const unsigned int &,
|
||||
const long &,
|
||||
const unsigned long &,
|
||||
const long long &,
|
||||
const unsigned long long &,
|
||||
const float &,
|
||||
const double &
|
||||
%{ $1 = ($1_ltype)&$input; %}
|
||||
|
||||
%typemap(in) const long & ($*1_ltype temp),
|
||||
const unsigned long & ($*1_ltype temp)
|
||||
%{ temp = ($*1_ltype)$input;
|
||||
$1 = ($1_ltype)&temp; %}
|
||||
|
||||
%typemap(out) bool,
|
||||
char,
|
||||
signed char,
|
||||
|
|
|
|||
|
|
@ -4794,6 +4794,9 @@ private:
|
|||
if (is_int) {
|
||||
ret = NewString("intgo ");
|
||||
Append(ret, name);
|
||||
} else if (is_int64) {
|
||||
ret = NewString("long long ");
|
||||
Append(ret, name);
|
||||
} else {
|
||||
ret = SwigType_lstr(t, name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue