BigInteger fixes - Bug 1398394
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8334 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
180a2372dc
commit
9883f6215a
2 changed files with 12 additions and 54 deletions
|
|
@ -264,15 +264,8 @@
|
|||
bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
|
||||
sz = JCALL1(GetArrayLength, jenv, ba);
|
||||
$1 = 0;
|
||||
if (bae[0] == 0) {
|
||||
for(i=sz-1; i>0; i-- ) {
|
||||
$1 = ($1 << 8) | (unsigned char)bae[sz-i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(i=sz; i>=0; i-- ) {
|
||||
$1 = ($1 << 8) | (unsigned char)bae[sz-1-i];
|
||||
}
|
||||
for(i=0; i<sz; i++) {
|
||||
$1 = ($1 << 8) | (unsigned long long)(unsigned char)bae[i];
|
||||
}
|
||||
JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
|
||||
}
|
||||
|
|
@ -295,15 +288,8 @@
|
|||
bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
|
||||
sz = JCALL1(GetArrayLength, jenv, ba);
|
||||
$1 = 0;
|
||||
if (bae[0] == 0) {
|
||||
for(i=sz-1; i>0; i-- ) {
|
||||
$1 = ($1 << 8) | (unsigned char)bae[sz-i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(i=sz; i>=0; i-- ) {
|
||||
$1 = ($1 << 8) | (unsigned char)bae[sz-1-i];
|
||||
}
|
||||
for(i=0; i<sz; i++) {
|
||||
$1 = ($1 << 8) | (unsigned long long)(unsigned char)bae[i];
|
||||
}
|
||||
JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
|
||||
}
|
||||
|
|
@ -507,15 +493,8 @@
|
|||
sz = JCALL1(GetArrayLength, jenv, ba);
|
||||
$1 = &temp;
|
||||
temp = 0;
|
||||
if (bae[0] == 0) {
|
||||
for(i=sz-1; i>0; i-- ) {
|
||||
temp = (temp << 8) | (unsigned char)bae[sz-i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(i=sz; i>=0; i-- ) {
|
||||
temp = (temp << 8) | (unsigned char)bae[sz-1-i];
|
||||
}
|
||||
for(i=0; i<sz; i++) {
|
||||
temp = (temp << 8) | (unsigned long long)(unsigned char)bae[i];
|
||||
}
|
||||
JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
|
||||
}
|
||||
|
|
@ -540,15 +519,8 @@
|
|||
sz = JCALL1(GetArrayLength, jenv, ba);
|
||||
$1 = &temp;
|
||||
temp = 0;
|
||||
if (bae[0] == 0) {
|
||||
for(i=sz-1; i>0; i-- ) {
|
||||
temp = (temp << 8) | (unsigned char)bae[sz-i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(i=sz; i>=0; i-- ) {
|
||||
temp = (temp << 8) | (unsigned char)bae[sz-1-i];
|
||||
}
|
||||
for(i=0; i<sz; i++) {
|
||||
temp = (temp << 8) | (unsigned long long)(unsigned char)bae[i];
|
||||
}
|
||||
JCALL3(ReleaseByteArrayElements, jenv, ba, bae, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue