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 conversion of Guile lists to c native immediate arrays #89

Open
spk121 opened this issue Sep 26, 2020 · 1 comment
Open

Support conversion of Guile lists to c native immediate arrays #89

spk121 opened this issue Sep 26, 2020 · 1 comment

Comments

@spk121
Copy link
Owner

spk121 commented Sep 26, 2020

When working with tree-store:set aka gtk_tree_store_set_valuesv, it uses gint* to receive a list of columns. Currently guile-gi expects to receive a bytevector. For IN arguments, we could support converting Scheme lists of integers to gint* arrays make such API easier on use.
This could be extended to the multiple integer and real number types
This would be a slow path, but, in the case of tree-store:set these C arrays are expected to be quite short.

@LordYuuma
Copy link
Collaborator

Is there a reason to do this internally rather than using list->[us]XX-vector, the procedures from (gi util) or even the [us]XXvector notation? Doing that would not only complicate the logic inside gig_argument, but also the creation of functions as we'd have to create any number of overrides for list/bytevector equivalences [not just those for optional arguments].

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

2 participants