summaryrefslogtreecommitdiff
path: root/poptint.h
diff options
context:
space:
mode:
authorjbj <jbj>2008-02-12 22:01:46 +0000
committerjbj <jbj>2008-02-12 22:01:46 +0000
commitb85d91fda8a38a797d0ecb5e761e0f14930c4974 (patch)
tree0ba457187c3cf3f4abee8a14ae8ed545891dbeec /poptint.h
parentda94ec5a99e8ed7418db402319c75bc2ab9bfc1a (diff)
downloadlibpopt-b85d91fda8a38a797d0ecb5e761e0f14930c4974.tar.gz
- jbj: poptint.h: add poptSubstituteHelpI18N() to bury the ABI hack.
Diffstat (limited to 'poptint.h')
-rw-r--r--poptint.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/poptint.h b/poptint.h
index 2b2d6b6..cd56b9c 100644
--- a/poptint.h
+++ b/poptint.h
@@ -45,17 +45,27 @@ typedef struct {
/** \ingroup popt
* A union to simplify opt->arg access without casting.
*/
+/*@-exporttype -fielduse@*/
typedef union poptArg_u {
+/*@shared@*/
void * ptr;
int * intp;
long * longp;
const char ** argv;
poptCallbackType cb;
+/*@shared@*/
poptOption opt;
} poptArg;
+/*@=exporttype =fielduse@*/
#define poptArgType(opt) ((opt)->argInfo & POPT_ARG_MASK)
+/* XXX sick hack to preserve pretense of a popt-1.x ABI. */
+#define poptSubstituteHelpI18N(opt) \
+ { /*@-observertrans@*/ \
+ if ((opt) == poptHelpOptions) (opt) = poptHelpOptionsI18N; \
+ /*@=observertrans@*/ }
+
struct optionStackEntry {
int argc;
/*@only@*/ /*@null@*/