fixed stores of types smaller than sizeof(PRInt32)

This commit is contained in:
beard%netscape.com 1999-05-06 14:21:08 +00:00
Родитель 24007a6856
Коммит 3d79101951
2 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -86,12 +86,12 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s, double
}
switch(s->type)
{
case nsXPTType::T_I8 : *((PRInt8*) d) = s->val.i8; break;
case nsXPTType::T_I16 : *((PRInt16*) d) = s->val.i16; break;
case nsXPTType::T_I8 : *((PRInt32*) d) = s->val.i8; break;
case nsXPTType::T_I16 : *((PRInt32*) d) = s->val.i16; break;
case nsXPTType::T_I32 : *((PRInt32*) d) = s->val.i32; break;
case nsXPTType::T_I64 : *((PRInt64*) d) = s->val.i64; d++; break;
case nsXPTType::T_U8 : *((PRUint8*) d) = s->val.u8; break;
case nsXPTType::T_U16 : *((PRUint16*)d) = s->val.u16; break;
case nsXPTType::T_U8 : *((PRUint32*) d) = s->val.u8; break;
case nsXPTType::T_U16 : *((PRUint32*)d) = s->val.u16; break;
case nsXPTType::T_U32 : *((PRUint32*)d) = s->val.u32; break;
case nsXPTType::T_U64 : *((PRUint64*)d) = s->val.u64; d++; break;
case nsXPTType::T_FLOAT : *((float*) d) = s->val.f;
@ -103,8 +103,8 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s, double
fprData[fpCount++] = s->val.d;
break;
case nsXPTType::T_BOOL : *((PRBool*) d) = s->val.b; break;
case nsXPTType::T_CHAR : *((char*) d) = s->val.c; break;
case nsXPTType::T_WCHAR : *((wchar_t*) d) = s->val.wc; break;
case nsXPTType::T_CHAR : *((PRInt32*) d) = s->val.c; break;
case nsXPTType::T_WCHAR : *((PRUint32*) d) = s->val.wc; break;
default:
// all the others are plain pointer types
*((void**)d) = s->val.p;

Просмотреть файл

@ -86,12 +86,12 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s, double
}
switch(s->type)
{
case nsXPTType::T_I8 : *((PRInt8*) d) = s->val.i8; break;
case nsXPTType::T_I16 : *((PRInt16*) d) = s->val.i16; break;
case nsXPTType::T_I8 : *((PRInt32*) d) = s->val.i8; break;
case nsXPTType::T_I16 : *((PRInt32*) d) = s->val.i16; break;
case nsXPTType::T_I32 : *((PRInt32*) d) = s->val.i32; break;
case nsXPTType::T_I64 : *((PRInt64*) d) = s->val.i64; d++; break;
case nsXPTType::T_U8 : *((PRUint8*) d) = s->val.u8; break;
case nsXPTType::T_U16 : *((PRUint16*)d) = s->val.u16; break;
case nsXPTType::T_U8 : *((PRUint32*) d) = s->val.u8; break;
case nsXPTType::T_U16 : *((PRUint32*)d) = s->val.u16; break;
case nsXPTType::T_U32 : *((PRUint32*)d) = s->val.u32; break;
case nsXPTType::T_U64 : *((PRUint64*)d) = s->val.u64; d++; break;
case nsXPTType::T_FLOAT : *((float*) d) = s->val.f;
@ -103,8 +103,8 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s, double
fprData[fpCount++] = s->val.d;
break;
case nsXPTType::T_BOOL : *((PRBool*) d) = s->val.b; break;
case nsXPTType::T_CHAR : *((char*) d) = s->val.c; break;
case nsXPTType::T_WCHAR : *((wchar_t*) d) = s->val.wc; break;
case nsXPTType::T_CHAR : *((PRInt32*) d) = s->val.c; break;
case nsXPTType::T_WCHAR : *((PRUint32*) d) = s->val.wc; break;
default:
// all the others are plain pointer types
*((void**)d) = s->val.p;