You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
There are a few scenarios where plain structs were defined as classes in managed land.
Note in this issue the cases where we need to generate a class instead of a struct for Record:
GList:
// This native struct cannot be expressed in C#. We need to generate a wrapper class for the struct pointer.
struct List
{
void *data;
List *prev, *next;
}
// Managed then becomes
class List
{
IntPtr native;
// Methods which interact with the native pointer.
// In case we want to provide unsafe access to the native data
unsafe struct ListInternal
{
IntPtr data;
ListInternal* prev, next;
}
public unsafe ListInternal *Native => (ListInternal *)native;
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
There are a few scenarios where plain structs were defined as classes in managed land.
Note in this issue the cases where we need to generate a class instead of a struct for Record:
The text was updated successfully, but these errors were encountered: