Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
xptcinvoke.cpp File Reference
#include "xptcprivate.h"

Go to the source code of this file.

Functions

static void __fastcall invoke_copy_to_stack (PRUint32 *d, PRUint32 paramCount, nsXPTCVariant *s)
 __declspec (naked) XPTC_PUBLIC_API(nsresult) XPTC_InvokeByIndex(nsISupports *that

Variables

PRUint32 methodIndex
PRUint32 PRUint32 paramCount

Function Documentation

__declspec ( naked  )
static void __fastcall invoke_copy_to_stack ( PRUint32 d,
PRUint32  paramCount,
nsXPTCVariant s 
) [static]

Definition at line 47 of file xptcinvoke.cpp.

{
    for(; paramCount > 0; paramCount--, d++, s++)
    {
        if(s->IsPtrData())
        {
            *((void**)d) = s->ptr;
            continue;
        }
        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_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_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;           break;
        case nsXPTType::T_DOUBLE : *((double*)  d) = s->val.d;   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;
        default:
            // all the others are plain pointer types
            *((void**)d) = s->val.p;
            break;
        }
    }
}

Here is the call graph for this function:


Variable Documentation

Definition at line 81 of file xptcinvoke.cpp.

Definition at line 81 of file xptcinvoke.cpp.