summaryrefslogtreecommitdiff
path: root/src/option.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-05-23 00:37:45 -0600
committerJohn Wiegley <johnw@newartisans.com>2010-05-23 00:37:54 -0600
commit834d223c27f8240122dcc0de0e614f1b2e62c08e (patch)
treee0c67e1dbb043fcaf4c56429ab2bcd7f738cc659 /src/option.h
parent3fab2e1333dc0da4614900f7e231579a12d2e1c8 (diff)
downloadfork-ledger-834d223c27f8240122dcc0de0e614f1b2e62c08e.tar.gz
fork-ledger-834d223c27f8240122dcc0de0e614f1b2e62c08e.tar.bz2
fork-ledger-834d223c27f8240122dcc0de0e614f1b2e62c08e.zip
Do not generate names with double underscores
Fixes 6A4AFDC2-DE87-48A5-A17D-B04120EE1F62
Diffstat (limited to 'src/option.h')
-rw-r--r--src/option.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/option.h b/src/option.h
index cd3cd594..f11497a4 100644
--- a/src/option.h
+++ b/src/option.h
@@ -205,20 +205,20 @@ public:
};
#define BEGIN(type, name) \
- struct name ## _option_t : public option_t<type>
+ struct name ## option_t : public option_t<type>
#define CTOR(type, name) \
- name ## _option_t() : option_t<type>(#name)
+ name ## option_t() : option_t<type>(#name)
#define DECL1(type, name, vartype, var, value) \
vartype var ; \
- name ## _option_t() : option_t<type>(#name), var(value)
+ name ## option_t() : option_t<type>(#name), var(value)
#define DO() virtual void handler_thunk(call_scope_t&)
#define DO_(var) virtual void handler_thunk(call_scope_t& var)
-#define END(name) name ## _handler
+#define END(name) name ## handler
-#define COPY_OPT(name, other) name ## _handler(other.name ## _handler)
+#define COPY_OPT(name, other) name ## handler(other.name ## handler)
#define MAKE_OPT_HANDLER(type, x) \
expr_t::op_t::wrap_functor(bind(&option_t<type>::handler_wrapper, x, _1))
@@ -238,26 +238,26 @@ inline bool is_eq(const char * p, const char * n) {
#define OPT(name) \
if (is_eq(p, #name)) \
- return ((name ## _handler).parent = this, &(name ## _handler))
+ return ((name ## handler).parent = this, &(name ## handler))
#define OPT_ALT(name, alt) \
if (is_eq(p, #name) || is_eq(p, #alt)) \
- return ((name ## _handler).parent = this, &(name ## _handler))
+ return ((name ## handler).parent = this, &(name ## handler))
#define OPT_(name) \
if (! *(p + 1) || \
- ((name ## _handler).wants_arg && \
+ ((name ## handler).wants_arg && \
*(p + 1) == '_' && ! *(p + 2)) || \
is_eq(p, #name)) \
- return ((name ## _handler).parent = this, &(name ## _handler))
+ return ((name ## handler).parent = this, &(name ## handler))
#define OPT_CH(name) \
if (! *(p + 1) || \
- ((name ## _handler).wants_arg && \
+ ((name ## handler).wants_arg && \
*(p + 1) == '_' && ! *(p + 2))) \
- return ((name ## _handler).parent = this, &(name ## _handler))
+ return ((name ## handler).parent = this, &(name ## handler))
-#define HANDLER(name) name ## _handler
+#define HANDLER(name) name ## handler
#define HANDLED(name) HANDLER(name)
#define OPTION(type, name) \