Re: clutter - "... int *argc" - their doc entries and corresponding GIArgInfo
David Pirotte <[email protected]> Fri, 10 May 2019 23:54:41 -0300
| Newsgroups | gmane.comp.gnome.language-bindings |
|---|---|
| Message-ID | <20190510235441.4e5b1e23@capac> |
--===============7051409900619177710==
Content-Type: multipart/signed; micalg=pgp-sha512;
boundary="Sig_/q5xPUoXFiUKZ80NszbgOnPJ"; protocol="application/pgp-signature"
--Sig_/q5xPUoXFiUKZ80NszbgOnPJ
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Hello Phil,
Thanks for your taking some of your time to answer. Mean while, I've had qu=
ite a
long chat about all this (special thanks to ptomato[m] and ebassy), and a p=
ointer
to how GJS has implemented preparation and calls to g_function_info_invoke,
beautifully written, but 'forced to' a level of complexity that could be av=
oided,
imo.
Thanks for the links as well.
> ...
> argc [inout][optional]
> argv [inout][array length=3Dargc][optional]
Yes, that is what I was expecting (talking about argc), together with an ac=
curate
description: argc is a pointer to an integer, which can be NULL, it is not =
an
integer.
> The annotations for [clutter_init][5] are not quite as you have quoted:=20
> they do include the array annotation on argv:
Sorry, I I did copy from somewhere it didn't mention that, but argv was and
still is not 'the problem' I wanted to talk about, so let's forget about it.
> argc [inout]
> argv [array length=3Dargc][inout][allow-none]
> It could be argued that the array annotation (that links argc to argv)=20
> ...
The above version is the one I expect
argc [inout][optional]
argv [inout][array length=3Dargc][optional]
together with an accurate description (for argc)
a pointer to the number of arguments in argv
[ which I prefer to "... of command line arguments", but ok
> The extra level of indirection for out and inout arguments is not=20
> counted by [g_type_info_is_pointer][6]. (Therefore 'direction' needs to=
=20
> be known to determine the C type from the GIArgInfo data.)
I haven't been convinced, imo, the GIArgInfo, for argc, should always tell =
us
exactly what the C function argument is, in this case, in substance:
...
type-tag =3D pointer
pointing-to =3D one-integer
...
is-pointer? =3D #t
may-be-null? =3D #t
...
gi-argument-field =3D v-pointer
Regards,
David
--Sig_/q5xPUoXFiUKZ80NszbgOnPJ
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAlzWOXEACgkQ83T9k6MF
etcGnQf/bUK9hE9BSwKnkfWEkUXr1o7kaNuO0eGlFY9/bUteMSd7p9jLTV+HO6I1
ozUrbhQEdernYPZe4NuTLFbGpiQLWEUfFEIh1sTbXifTQmEtXqxWBBuEsa9PrxQp
hMrAFfQ0a/LvZnFQVGFVA/f/wKxBwME9Dn8CrRrHH8qBRi7smzYIC6+Kz5QJVoLy
EKVdzdga1xrM/+9gUu4tIEdDYz/HrcK8DEhvlx8pOs3LA+r5UTJ+kiX2dEfJYM8g
3LkJa57H/UzYzGEgJmi8igOKbnkiPdhIr+HPOYyWNqxkNXs4xYKkMFLJ4NeB37qu
pn1vnPwkRdNoMfcnSB3ZhXoQC3+UMQ==
=Y73W
-----END PGP SIGNATURE-----
--Sig_/q5xPUoXFiUKZ80NszbgOnPJ--
--===============7051409900619177710==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
language-bindings mailing list [email protected]
https://mail.gnome.org/mailman/listinfo/language-bindings
--===============7051409900619177710==--