diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-02-04 18:45:19 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-02-04 18:45:19 (GMT) |
commit | ff187d24b7441e88e1f0361d59b0f6f55851791f (patch) | |
tree | e340d88fb8189ef79f2c2d4193eea97be4fa003e /plugins/dexbnf/core.c | |
parent | 9b35b89fce2499d5352f5323baec53abbf9a4af2 (diff) |
Added an option to drop Python support at compilation time.
Diffstat (limited to 'plugins/dexbnf/core.c')
-rw-r--r-- | plugins/dexbnf/core.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/dexbnf/core.c b/plugins/dexbnf/core.c index 736fa5f..f96f64b 100644 --- a/plugins/dexbnf/core.c +++ b/plugins/dexbnf/core.c @@ -24,17 +24,27 @@ #include "core.h" +#include <config.h> #include <core/demanglers.h> #include <plugins/plugin-def.h> #include "demangler.h" -#include "python/module.h" +#ifdef HAVE_PYTHON3_BINDINGS +# include "python/module.h" +#endif + + +#ifdef HAVE_PYTHON3_BINDINGS +# define PG_REQ RL("PyChrysalide") +#else +# define PG_REQ NO_REQ +#endif DEFINE_CHRYSALIDE_PLUGIN("GDexBnfPlugin", "dexbnf", "Symbol demangler for Dex", "0.1.0", - RL("PyChrysalide"), AL(PGA_PLUGIN_INIT)); + PG_REQ, AL(PGA_PLUGIN_INIT)); @@ -56,8 +66,10 @@ G_MODULE_EXPORT bool chrysalide_plugin_init(GPluginModule *plugin) result = register_demangler_type("dex", G_TYPE_DEX_DEMANGLER); +#ifdef HAVE_PYTHON3_BINDINGS if (result) result = add_mangling_dexbnf_module_to_python_module(); +#endif return result; |