Bug 308020: GOption - G_ARG_CALLBACK should allow none arg callback



In goption.c, the function that the program gives to
G_OPTION_ARG_CALLBACK doesn't get called when no argument is given
with the switch. This is a undesired effect because you can't use
G_ARG_CALLBACK for options that don't have an arguments (ie. like a
callback for a G_OPTION_ARG_NONE). I made a patch to let
G_OPTION_ARG_CALLBACK be able to send "gchar value" as NULL to the
function, if the arguement wasn't given. So now it is up to the app's
G_OPTION_ARG_CALLBACK function to check if value is NULL.

Attachment: goption_bug_308020.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]