Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GLib.Array / GLib.PtrArray / GLib.ByteArray in Generator #748

Open
badcel opened this issue Jan 9, 2023 · 0 comments
Open

Support GLib.Array / GLib.PtrArray / GLib.ByteArray in Generator #748

badcel opened this issue Jan 9, 2023 · 0 comments
Milestone

Comments

@badcel
Copy link
Member

badcel commented Jan 9, 2023

Unfortunately there are certain GLib array types which need special attention, e.g.:

<array name="GLib.PtrArray" c:type="GPtrArray*">
    <type name="Value"/>
</array>

Those array are different than other arrays as a pointer to a special GPtrArray struct must be provided. This struct contains the length of the array (e.g.: https://docs.gtk.org/glib/struct.PtrArray.html)

If we have some managed data we need to convert it into the corresponding GLib array type. For this to happen the generator must know how to convert the data.

GirModel already differentiates those different types of arrays.

Check if this allows to remove struct arrays safehandles (e.g. ValueArray2OwnedHandle).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant