use NSPR's LL_ macros to do 64 bit stuff.

This commit is contained in:
toshok%hungry.com 1999-04-15 01:40:33 +00:00
parent a6f1d9d420
commit ff0300a8eb
2 changed files with 18 additions and 16 deletions

View File

@ -20,6 +20,7 @@
#include <stdio.h>
#include "xptcall.h"
#include "prlong.h"
// {AAC1FB90-E099-11d2-984E-006008962422}
#define INVOKETESTTARGET_IID \
@ -96,7 +97,7 @@ int main()
printf("\t1 + 1 = %d\n", out);
else
printf("\tFAILED");
if(NS_SUCCEEDED(test->AddTwoLLs(1,1,&out64)))
if(NS_SUCCEEDED(test->AddTwoLLs(LL_INIT(0,1),LL_INIT(0,1),&out64)))
printf("\t1L + 1L = %dL\n", out);
else
printf("\tFAILED");
@ -104,7 +105,7 @@ int main()
printf("\t2 * 2 = %d\n", out);
else
printf("\tFAILED");
if(NS_SUCCEEDED(test->MultTwoLLs(2,2,&out64)))
if(NS_SUCCEEDED(test->MultTwoLLs(LL_INIT(0,2),LL_INIT(0,2),&out64)))
printf("\t2L * 2L = %dL\n", out);
else
printf("\tFAILED");
@ -131,15 +132,15 @@ int main()
else
printf("\tFAILED");
var[0].val.i64 = 1;
LL_I2L(var[0].val.i64, 1);
var[0].type = nsXPTType::T_I64;
var[0].flags = 0;
var[1].val.i64 = 1;
LL_I2L(var[1].val.i64, 1);
var[1].type = nsXPTType::T_I64;
var[1].flags = 0;
var[2].val.i64 = 0;
LL_I2L(var[2].val.i64, 0);
var[2].type = nsXPTType::T_I64;
var[2].flags = nsXPTCVariant::PTR_IS_DATA;
var[2].ptr = &var[2].val.i64;
@ -167,15 +168,15 @@ int main()
else
printf("\tFAILED");
var[0].val.i64 = 2;
LL_I2L(var[0].val.i64,2);
var[0].type = nsXPTType::T_I64;
var[0].flags = 0;
var[1].val.i64 = 2;
LL_I2L(var[1].val.i64,2);
var[1].type = nsXPTType::T_I64;
var[1].flags = 0;
var[2].val.i64 = 0;
LL_I2L(var[2].val.i64,0);
var[2].type = nsXPTType::T_I64;
var[2].flags = nsXPTCVariant::PTR_IS_DATA;
var[2].ptr = &var[2].val.i64;

View File

@ -20,6 +20,7 @@
#include <stdio.h>
#include "xptcall.h"
#include "prlong.h"
// {AAC1FB90-E099-11d2-984E-006008962422}
#define INVOKETESTTARGET_IID \
@ -96,7 +97,7 @@ int main()
printf("\t1 + 1 = %d\n", out);
else
printf("\tFAILED");
if(NS_SUCCEEDED(test->AddTwoLLs(1,1,&out64)))
if(NS_SUCCEEDED(test->AddTwoLLs(LL_INIT(0,1),LL_INIT(0,1),&out64)))
printf("\t1L + 1L = %dL\n", out);
else
printf("\tFAILED");
@ -104,7 +105,7 @@ int main()
printf("\t2 * 2 = %d\n", out);
else
printf("\tFAILED");
if(NS_SUCCEEDED(test->MultTwoLLs(2,2,&out64)))
if(NS_SUCCEEDED(test->MultTwoLLs(LL_INIT(0,2),LL_INIT(0,2),&out64)))
printf("\t2L * 2L = %dL\n", out);
else
printf("\tFAILED");
@ -131,15 +132,15 @@ int main()
else
printf("\tFAILED");
var[0].val.i64 = 1;
LL_I2L(var[0].val.i64, 1);
var[0].type = nsXPTType::T_I64;
var[0].flags = 0;
var[1].val.i64 = 1;
LL_I2L(var[1].val.i64, 1);
var[1].type = nsXPTType::T_I64;
var[1].flags = 0;
var[2].val.i64 = 0;
LL_I2L(var[2].val.i64, 0);
var[2].type = nsXPTType::T_I64;
var[2].flags = nsXPTCVariant::PTR_IS_DATA;
var[2].ptr = &var[2].val.i64;
@ -167,15 +168,15 @@ int main()
else
printf("\tFAILED");
var[0].val.i64 = 2;
LL_I2L(var[0].val.i64,2);
var[0].type = nsXPTType::T_I64;
var[0].flags = 0;
var[1].val.i64 = 2;
LL_I2L(var[1].val.i64,2);
var[1].type = nsXPTType::T_I64;
var[1].flags = 0;
var[2].val.i64 = 0;
LL_I2L(var[2].val.i64,0);
var[2].type = nsXPTType::T_I64;
var[2].flags = nsXPTCVariant::PTR_IS_DATA;
var[2].ptr = &var[2].val.i64;