mainly for SF bug #3423119
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12828 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
17c5f881ee
commit
fb9750698f
3 changed files with 19 additions and 5 deletions
|
|
@ -172,8 +172,12 @@ SWIG_From_dec(long long)(long long value)
|
|||
SV *sv;
|
||||
if (value >= IV_MIN && value <= IV_MAX)
|
||||
sv = newSViv(value);
|
||||
else
|
||||
sv = newSVpvf("%lld", value);
|
||||
else {
|
||||
//sv = newSVpvf("%lld", value); doesn't work in non 64bit Perl
|
||||
char temp[256];
|
||||
sprintf(temp, "%lld", value);
|
||||
sv = newSVpv(temp, 0);
|
||||
}
|
||||
return sv_2mortal(sv);
|
||||
}
|
||||
}
|
||||
|
|
@ -245,8 +249,12 @@ SWIG_From_dec(unsigned long long)(unsigned long long value)
|
|||
SV *sv;
|
||||
if (value <= UV_MAX)
|
||||
sv = newSVuv(value);
|
||||
else
|
||||
sv = newSVpvf("%llu", value);
|
||||
else {
|
||||
//sv = newSVpvf("%llu", value); doesn't work in non 64bit Perl
|
||||
char temp[256];
|
||||
sprintf(temp, "%llu", value);
|
||||
sv = newSVpv(temp, 0);
|
||||
}
|
||||
return sv_2mortal(sv);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue