Skip to content

Handle returned arrays and arrays in parameters of overrides #953

Open
@ddobrev

Description

@ddobrev

We don't know the size of an array returned from native code. There's nothing we can do except let users deal with it if they know that size. @tritao suggests we use a special class called CArray which is constructed with a single pointer and has a convenient method which takes a size and returns an iterator based on it.

There are two ways we can use this CArray:

  1. Only use it for returned arrays and for arrays in parameters of virtual methods - use regular C# arrays in the remaining case of parameters used by non-virtual functions;
  2. Use CArray in all cases.

The first way has the advantage of providing a simpler API users are familiar with. The second way has the advantage of consistency. We have so far put the decision off until the time comes to implement this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions