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 308020 - GOption - G_ARG_CALLBACK should allow none arg callback
GOption - G_ARG_CALLBACK should allow none arg callback
Status: RESOLVED DUPLICATE of bug 302632
Product: glib
Classification: Platform
Component: general
2.7.x
Other All
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2005-06-17 04:10 UTC by Pawel Sliwowski
Modified: 2005-06-17 18:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Remove the check of value in parse_arg for switch G_OPTION_ARG_CALLBACK. (492 bytes, patch)
2005-06-17 04:12 UTC, Pawel Sliwowski
none Details | Review
Sorry wrong patch. This is the correct one. (3.35 KB, patch)
2005-06-17 05:59 UTC, Pawel Sliwowski
none Details | Review

Description Pawel Sliwowski 2005-06-17 04:10:22 UTC
In goption.c, the parse arg function returns FALSE for G_ARG_CALLBACK when value
is NULL. This is a undesired effect because you can't use G_ARG_CALLBACK for
options that don't have an argument (ie. G_OPTION_ARG_NONE). The user should
check if it is NULL and not the library.

Other information:
Comment 1 Pawel Sliwowski 2005-06-17 04:12:45 UTC
Created attachment 47886 [details] [review]
Remove the check of value in parse_arg for switch G_OPTION_ARG_CALLBACK.
Comment 2 Pawel Sliwowski 2005-06-17 05:59:38 UTC
Created attachment 47888 [details] [review]
Sorry wrong patch. This is the correct one.
Comment 3 Matthias Clasen 2005-06-17 18:01:33 UTC

*** This bug has been marked as a duplicate of 302632 ***