diff options
Diffstat (limited to 'plugins/pychrysalide/analysis/contents')
4 files changed, 21 insertions, 1 deletions
diff --git a/plugins/pychrysalide/analysis/contents/encapsulated.c b/plugins/pychrysalide/analysis/contents/encapsulated.c index ef26caa..03fce54 100644 --- a/plugins/pychrysalide/analysis/contents/encapsulated.c +++ b/plugins/pychrysalide/analysis/contents/encapsulated.c @@ -32,6 +32,7 @@ #include "../content.h" +#include "../storage/serialize.h" #include "../../access.h" #include "../../helpers.h" @@ -310,6 +311,9 @@ bool ensure_python_encaps_content_is_registered(void) dict = PyModule_GetDict(module); + if (!ensure_python_serializable_object_is_registered()) + return false; + if (!register_class_for_pygobject(dict, G_TYPE_ENCAPS_CONTENT, type, &PyGObject_Type)) return false; diff --git a/plugins/pychrysalide/analysis/contents/file.c b/plugins/pychrysalide/analysis/contents/file.c index 93a1ce8..4786cdb 100644 --- a/plugins/pychrysalide/analysis/contents/file.c +++ b/plugins/pychrysalide/analysis/contents/file.c @@ -31,6 +31,8 @@ #include <analysis/contents/file.h> +#include "memory.h" +#include "../storage/serialize.h" #include "../../access.h" #include "../../helpers.h" @@ -196,7 +198,13 @@ bool ensure_python_file_content_is_registered(void) dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_FILE_CONTENT, type, &PyGObject_Type)) + if (!ensure_python_memory_content_is_registered()) + return false; + + if (!ensure_python_serializable_object_is_registered()) + return false; + + if (!register_class_for_pygobject(dict, G_TYPE_FILE_CONTENT, type, get_python_memory_content_type())) return false; } diff --git a/plugins/pychrysalide/analysis/contents/memory.c b/plugins/pychrysalide/analysis/contents/memory.c index 8926300..37b098d 100644 --- a/plugins/pychrysalide/analysis/contents/memory.c +++ b/plugins/pychrysalide/analysis/contents/memory.c @@ -31,6 +31,7 @@ #include <analysis/contents/memory.h> +#include "../storage/serialize.h" #include "../../access.h" #include "../../helpers.h" @@ -164,6 +165,9 @@ bool ensure_python_memory_content_is_registered(void) dict = PyModule_GetDict(module); + if (!ensure_python_serializable_object_is_registered()) + return false; + if (!register_class_for_pygobject(dict, G_TYPE_MEMORY_CONTENT, type, &PyGObject_Type)) return false; diff --git a/plugins/pychrysalide/analysis/contents/restricted.c b/plugins/pychrysalide/analysis/contents/restricted.c index bbe364a..703f79b 100644 --- a/plugins/pychrysalide/analysis/contents/restricted.c +++ b/plugins/pychrysalide/analysis/contents/restricted.c @@ -35,6 +35,7 @@ #include "../content.h" +#include "../storage/serialize.h" #include "../../access.h" #include "../../helpers.h" #include "../../arch/vmpa.h" @@ -200,6 +201,9 @@ bool ensure_python_restricted_content_is_registered(void) dict = PyModule_GetDict(module); + if (!ensure_python_serializable_object_is_registered()) + return false; + if (!register_class_for_pygobject(dict, G_TYPE_RESTRICTED_CONTENT, type, &PyGObject_Type)) return false; |