summaryrefslogtreecommitdiff
path: root/plugins/pe
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pe')
-rw-r--r--plugins/pe/Makefile.am24
-rw-r--r--plugins/pe/core.c7
-rw-r--r--plugins/pe/python/Makefile.am20
-rw-r--r--plugins/pe/python/format.c7
-rw-r--r--plugins/pe/python/routine.c8
-rw-r--r--plugins/pe/symbols.h2
6 files changed, 33 insertions, 35 deletions
diff --git a/plugins/pe/Makefile.am b/plugins/pe/Makefile.am
index 038b8c5..e9cd482 100644
--- a/plugins/pe/Makefile.am
+++ b/plugins/pe/Makefile.am
@@ -37,19 +37,21 @@ PYTHON3_SUBDIRS = python
endif
-libpe_la_SOURCES = \
- core.h core.c \
- pe-int.h pe-int.c \
- format.h format.c \
- pe_def.h \
- rich.h rich.c \
- routine.h routine.c \
- section.h section.c \
+libpe_la_SOURCES = \
+ core.h core.c \
+ pe-int.h pe-int.c \
+ format.h format.c \
+ pe_def.h \
+ rich.h rich.c \
+ routine.h routine.c \
+ section.h section.c \
symbols.h symbols.c
-libpe_la_LIBADD = \
+libpe_la_LIBADD = \
$(PYTHON3_LIBADD)
+libpe_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
+
libpe_la_LDFLAGS = \
-avoid-version \
-L$(top_srcdir)/src/.libs -lchrysacore \
@@ -61,8 +63,4 @@ devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpe_la_SOURCES:%c=)
-AM_CPPFLAGS = $(LIBGTK_CFLAGS) $(LIBXML_CFLAGS) -I$(top_srcdir)/src
-
-AM_CFLAGS = $(DEBUG_CFLAGS) $(WARNING_FLAGS) $(COMPLIANCE_FLAGS)
-
SUBDIRS = $(PYTHON3_SUBDIRS)
diff --git a/plugins/pe/core.c b/plugins/pe/core.c
index aa51c18..ddbacf5 100644
--- a/plugins/pe/core.c
+++ b/plugins/pe/core.c
@@ -24,18 +24,17 @@
#include "core.h"
-#include <config.h>
#include <core/global.h>
#include <plugins/self.h>
#include "format.h"
-#ifdef HAVE_PYTHON3_BINDINGS
+#ifdef INCLUDE_PYTHON3_BINDINGS
# include "python/module.h"
#endif
-#ifdef HAVE_PYTHON3_BINDINGS
+#ifdef INCLUDE_PYTHON3_BINDINGS
# define PG_REQ RL("PyChrysalide")
#else
# define PG_REQ NO_REQ
@@ -65,7 +64,7 @@ G_MODULE_EXPORT bool chrysalide_plugin_init(GPluginModule *plugin)
{
bool result; /* Bilan à retourner */
-#ifdef HAVE_PYTHON3_BINDINGS
+#ifdef INCLUDE_PYTHON3_BINDINGS
result = add_format_pe_module_to_python_module();
#else
result = true;
diff --git a/plugins/pe/python/Makefile.am b/plugins/pe/python/Makefile.am
index 18634a3..5949821 100644
--- a/plugins/pe/python/Makefile.am
+++ b/plugins/pe/python/Makefile.am
@@ -1,23 +1,17 @@
noinst_LTLIBRARIES = libpepython.la
-libpepython_la_SOURCES = \
- constants.h constants.c \
- format.h format.c \
- module.h module.c \
- routine.h routine.c \
+libpepython_la_SOURCES = \
+ constants.h constants.c \
+ format.h format.c \
+ module.h module.c \
+ routine.h routine.c \
translate.h translate.c
-
-libpepython_la_LDFLAGS =
+libpepython_la_CFLAGS = $(TOOLKIT_CFLAGS) $(LIBXML_CFLAGS) $(LIBPYTHON_CFLAGS) $(LIBPYGOBJECT_CFLAGS) \
+ -I$(top_srcdir)/src -DNO_IMPORT_PYGOBJECT
devdir = $(includedir)/chrysalide/$(subdir)
dev_HEADERS = $(libpepython_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/pe/python/format.c b/plugins/pe/python/format.c
index d295da4..4bbb99a 100644
--- a/plugins/pe/python/format.c
+++ b/plugins/pe/python/format.c
@@ -115,7 +115,7 @@ static PyObject *py_pe_format_new(PyTypeObject *type, PyObject *args, PyObject *
if (first_time)
{
- status = register_class_for_dynamic_pygobject(gtype, type, base);
+ status = register_class_for_dynamic_pygobject(gtype, type);
if (!status)
{
@@ -539,7 +539,10 @@ bool register_python_pe_format(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_PE_FORMAT, type, get_python_executable_format_type()))
+ if (!ensure_python_executable_format_is_registered())
+ return false;
+
+ if (!register_class_for_pygobject(dict, G_TYPE_PE_FORMAT, type))
return false;
if (!define_python_pe_format_constants(type))
diff --git a/plugins/pe/python/routine.c b/plugins/pe/python/routine.c
index cebeb2a..fd30e6d 100644
--- a/plugins/pe/python/routine.c
+++ b/plugins/pe/python/routine.c
@@ -221,7 +221,9 @@ bool register_python_pe_exported_routine(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_PE_EXPORTED_ROUTINE, type, get_python_binary_routine_type()))
+ /* TODO : ensure get_python_binary_routine_type() */
+
+ if (!register_class_for_pygobject(dict, G_TYPE_PE_EXPORTED_ROUTINE, type))
return false;
if (!define_python_pe_exported_routine_constants(type))
@@ -461,7 +463,9 @@ bool register_python_pe_imported_routine(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_PE_IMPORTED_ROUTINE, type, get_python_pe_exported_routine_type()))
+ /* TODO : ensure get_python_pe_exported_routine_type() */
+
+ if (!register_class_for_pygobject(dict, G_TYPE_PE_IMPORTED_ROUTINE, type))
return false;
return true;
diff --git a/plugins/pe/symbols.h b/plugins/pe/symbols.h
index bb260cd..5c4b796 100644
--- a/plugins/pe/symbols.h
+++ b/plugins/pe/symbols.h
@@ -29,7 +29,7 @@
#include <glibext/delayed.h>
-#include <gtkext/gtkstatusstack.h>
+#include <glibext/notifier.h>