summaryrefslogtreecommitdiff
path: root/plugins/elf/python
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/elf/python')
-rw-r--r--plugins/elf/python/Makefile.am25
-rw-r--r--plugins/elf/python/format.c12
2 files changed, 17 insertions, 20 deletions
diff --git a/plugins/elf/python/Makefile.am b/plugins/elf/python/Makefile.am
index 29b7d98..1d4f671 100644
--- a/plugins/elf/python/Makefile.am
+++ b/plugins/elf/python/Makefile.am
@@ -1,25 +1,20 @@
noinst_LTLIBRARIES = libelfpython.la
-libelfpython_la_SOURCES = \
- constants.h constants.c \
- dynamic.h dynamic.c \
- elf_def.h elf_def.c \
- format.h format.c \
- module.h module.c \
- program.h program.c \
- section.h section.c \
+libelfpython_la_SOURCES = \
+ constants.h constants.c \
+ dynamic.h dynamic.c \
+ elf_def.h elf_def.c \
+ format.h format.c \
+ module.h module.c \
+ program.h program.c \
+ section.h section.c \
translate.h translate.c
-libelfpython_la_LDFLAGS =
+libelfpython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libelfpython_la_SOURCES:%c=)
-
-
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
- -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
diff --git a/plugins/elf/python/format.c b/plugins/elf/python/format.c
index e0195c4..95eaa9a 100644
--- a/plugins/elf/python/format.c
+++ b/plugins/elf/python/format.c
@@ -244,18 +244,20 @@ PyTypeObject *get_python_elf_format_type(void)
bool register_python_elf_format(PyObject *module)
{
- PyTypeObject *py_elf_format_type; /* Type Python 'ElfFormat' */
+ PyTypeObject *type; /* Type Python 'ElfFormat' */
PyObject *dict; /* Dictionnaire du module */
- py_elf_format_type = get_python_elf_format_type();
+ type = get_python_elf_format_type();
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_ELF_FORMAT,
- py_elf_format_type, get_python_executable_format_type()))
+ if (!ensure_python_executable_format_is_registered())
return false;
- if (!define_python_elf_format_constants(py_elf_format_type))
+ if (!register_class_for_pygobject(dict, G_TYPE_ELF_FORMAT, type))
+ return false;
+
+ if (!define_python_elf_format_constants(type))
return false;
return true;