IL2C icon indicating copy to clipboard operation
IL2C copied to clipboard

Support marshaling for the paramarray and arglist.

Open kekyo opened this issue 5 years ago • 0 comments

void Foo1(params object[] args);
void Foo2(__arglist args);

The paramarray will have to limitation, the max array element size limitation with hard-coded. I`m thinking about how realize arguments like:

switch (pArray->get_Length)
{
    // Problem 1: Array argument has to realize the array size in interoperability.
    case 1:
        // Problem 2: If array element type is System.Object, we have to translate safe type of C language manner.
        // For example: the element value is boxed int32, before we have to unbox int32.
        Foo1(pArray->get_Item(0, System_Object));
        break;
}

kekyo avatar Mar 09 '19 07:03 kekyo