clutter - "... int *argc" - their doc entries and corresponding GIArgInfo

David Pirotte <[email protected]> Sun, 5 May 2019 03:31:25 -0300
Newsgroups gmane.comp.gnome.language-bindings
Message-ID <20190505033125.55642ecb@capac>
--===============2031009537349976458==
Content-Type: multipart/signed; micalg=pgp-sha512;
 boundary="Sig_/I4R6CDQzNTxRG0R0ewcIwVr"; protocol="application/pgp-signature"

--Sig_/I4R6CDQzNTxRG0R0ewcIwVr
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

I am working on G-Golf (a guile scheme GI binding library) [1]. I now have a
'reasonably good sketch' to work on what will eventually let me 'fully bind=
' GI
functions.

While working on this, using Clutter to test, a few questions 'came up', wr=
t to
clutter_init and clutter_init_with_args first argument, their respective
documentation entry and the way GI defines their corresponding GIArg-Info.

1]	Lets start with the doc quiz:

	ClutterInitError
	clutter_init (int *argc,
        	      char ***argv);

	...
	argc	The number of arguments in argv.	[inout]
	argv	A pointer	to the array ...			[inout][allow-none]


	ClutterInitError
	clutter_init_with_args (int *argc,
        	                char ***argv,
				...

	...
	argc	a pointer to the number of command line arguments.	[inout]
	argv	a pointer	to the array ...							[inout][allow-none]

But I see in an 'old' guile-clutter binding (not using GI), which I can sti=
ll use, so it
works fine, that the initialization call is (always):

	if (clutter_init (NULL, NULL) !=3D CLUTTER_INIT_SUCCESS)

Which means that argc is a pointer, that can be NULL, so should the doc ent=
ry not be:

	argc	a pointer to the number of command line arguments.	[inout][allow-none]

2]	Now, 'their' GIArgInfo definition and related question

	[ you can see the complete <function> and <argument> instances for
	[ clutter_init, as 'seen' by G-Golf here [2], but here is 'just' the first
	[ argument, so I can ask my question>

Here is the definition the argc argument, as 'seen' by G-Golf

	#<<argument> 55e221b84ea0> - instance of <argument>
	  slots and values are:
	    name =3D argc
	    closure =3D -1
	    destroy =3D -1
	    direction =3D inout
	    transfert =3D everything
	    scope =3D invalid
	    type-tag =3D int32
	    type-desc =3D int32
	    is-pointer? =3D #f
	    may-be-null? =3D #f
	    is-caller-allocate? =3D #f
	    is-optional? =3D #f
	    is-return-value? =3D #f
	    is-skip? =3D #f
	    gi-argument =3D #<pointer 0x55e221b2cdd0>
	    gi-argument-field =3D v-int32

So, it's definitely not a pointer, and can't be null.
What am I missing here?

Thanks,
David

[1]	https://www.gnu.org/software/g-golf/

[2]	the clutter_init function and arguments s 'seen' by G-Golf

#<<function> 55e221b5b230> - instance of <function>
  slots and values are:
    name =3D clutter-init
    flags =3D ()
    n-arg =3D 2
    caller-owns =3D nothing
    return-type =3D interface
    type-desc =3D (enum clutter-init-error #<<gi-enum> 55e221a63120> 944297=
17812384)
    may-return-null? =3D #f
    arguments =3D (#<<argument> 55e221b84ea0> #<<argument> 55e221b84e10>)
    n-gi-arg-in =3D 2
    gi-args-in =3D #<pointer 0x55e221b2cd10>
    n-gi-arg-out =3D 2
    gi-args-out =3D #<pointer 0x55e221b2cce0>

#<<argument> 55e221b84ea0> - instance of <argument>
  slots and values are:
    name =3D argc
    closure =3D -1
    destroy =3D -1
    direction =3D inout
    transfert =3D everything
    scope =3D invalid
    type-tag =3D int32
    type-desc =3D int32
    is-pointer? =3D #f
    may-be-null? =3D #f
    is-caller-allocate? =3D #f
    is-optional? =3D #f
    is-return-value? =3D #f
    is-skip? =3D #f
    gi-argument =3D #<pointer 0x55e221b2cdd0>
    gi-argument-field =3D v-int32

#<<argument> 55e221b84e10> - instance of <argument>
  slots and values are:
    name =3D argv
    closure =3D -1
    destroy =3D -1
    direction =3D inout
    transfert =3D everything
    scope =3D invalid
    type-tag =3D array
    type-desc =3D (array . c)
    is-pointer? =3D #t
    may-be-null? =3D #t
    is-caller-allocate? =3D #f
    is-optional? =3D #t
    is-return-value? =3D #f
    is-skip? =3D #f
    gi-argument =3D #<pointer 0x55e221b2cd70>
    gi-argument-field =3D v-pointer




















--Sig_/I4R6CDQzNTxRG0R0ewcIwVr
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEhCJlRZtBM3furJHe83T9k6MFetcFAlzOgz0ACgkQ83T9k6MF
etd25AgAnHbPVpOf/eVfRsDy0FclH7/FszX8TnzE4TLPBxbBsxrr03ApYYdK1VBq
vJiCiclpq6CGxZl45Az3EDL3WPN9D4jh4Zk8MiJzZQMifUJB+pz5W6O+/cXsGLjw
y1J2eKAwgyKDBuA0NJdHMZVtNmVD18mh7+UoSqx9agJX0GMdUpBZ41SSb9H10vit
R8k5V25i2P0wCrxt0P4EeoH+gZpvF8hOvE9YAEoSms68Cd5SfpdQlip+gHKwHA7v
nZdRBIIGBcmrJ3lm7T8EWylA2q4Bb/M7T3D/pxcDI+nNl2TSaIA75CyLgSZ5ewQP
mgn8kBz35SXEYMIh6jcQQnOvOeV2Bg==
=vTkg
-----END PGP SIGNATURE-----

--Sig_/I4R6CDQzNTxRG0R0ewcIwVr--

--===============2031009537349976458==
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

--===============2031009537349976458==--