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
In most cases records are implemented as pointers, thus they are represented as SafeHandles. The current implementation supports the IEquality<> interface based on the handle´ of the SafeHandle`: Meaning two instances are equal if they point to the same memory.
From a user perspective this can be helpful. Another use case is that it is sufficient that the values of two records are equal to consider them equal.
In the C world two pointers are equal if they point to the same memory location. This is valid for Records, too. In C it is easy to dereference a pointer to compare their actual values. This feature is missing in gir.core currently.
Verify if there is need for value based equality and how to implement it.
(This could require usage of blitable types in structs, see #1000.)
The text was updated successfully, but these errors were encountered:
Follow up to #1000.
In most cases records are implemented as pointers, thus they are represented as SafeHandles. The current implementation supports the
IEquality<>
interface based on thehandle´ of the
SafeHandle`: Meaning two instances are equal if they point to the same memory.From a user perspective this can be helpful. Another use case is that it is sufficient that the values of two records are equal to consider them equal.
In the C world two pointers are equal if they point to the same memory location. This is valid for Records, too. In C it is easy to dereference a pointer to compare their actual values. This feature is missing in gir.core currently.
Verify if there is need for value based equality and how to implement it.
(This could require usage of blitable types in structs, see #1000.)
The text was updated successfully, but these errors were encountered: