diff --git a/popt/popt.c b/popt/popt.c index 96d605373..0df31796f 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -370,7 +370,7 @@ int poptGetNextOpt(poptContext con) { } if (cb) - cb(con, opt->val, con->os->nextArg, cbData); + cb(con, opt, con->os->nextArg, cbData); else if (opt->val) done = 1; diff --git a/popt/popt.h b/popt/popt.h index 50580f7c3..bdedceae4 100644 --- a/popt/popt.h +++ b/popt/popt.h @@ -55,8 +55,9 @@ extern struct poptOption poptHelpOptions[]; typedef struct poptContext_s * poptContext; typedef struct poptOption * poptOption; -typedef void (*poptCallbackType)(poptContext con, int key, const char * arg, - void * data); +typedef void (*poptCallbackType)(poptContext con, + const struct poptOption * opt, + const char * arg, void * data); poptContext poptGetContext(char * name, int argc, char ** argv, const struct poptOption * options, int flags);