After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 643649 - g_application_run() should say that argc/argv can be NULL
g_application_run() should say that argc/argv can be NULL
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gapplication
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 637445
 
 
Reported: 2011-03-02 08:01 UTC by Murray Cumming
Modified: 2011-03-05 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Murray Cumming 2011-03-02 08:01:26 UTC
Apparently, argc and argv can be NULL for both g_application_run() (even for GtkApplication) and gtk_init(). The documentation should say that is possible and what the meaning of that would be.
http://library.gnome.org/devel/gio/unstable/GApplication.html#g-application-run

At the moment, there is no real mention anyway of how argc and argv would be used by the GApplication (or GtkApplication). The gtk_init() documentation has also had only an indirect mention of "standard arguments" for years:
http://library.gnome.org/devel/gtk3/unstable/gtk3-General.html#gtk-init

Matthias Clasen and Colin Waters have suggested that NULL,NULL for argc,argv should even be the recommended way. If so, then that should be stated clearly:
http://mail.gnome.org/archives/gtk-devel-list/2011-February/msg00113.html
though that can be considered separately.
Comment 1 Murray Cumming 2011-03-04 08:20:07 UTC
Thanks, Mathias.
http://git.gnome.org/browse/glib/commit/?id=3c7203cf1ac0841e4613f40020f721f9c71ec0a4

May I make a similar change to the gtk_init_*() documentation? They currently have introspection annotation saying that NULL is allowed, but it's not there in the text for humans.
Comment 2 Matthias Clasen 2011-03-04 12:48:44 UTC
Yeah, please do.