diff options
Diffstat (limited to 'plugins/pychrysalide/arch')
-rw-r--r-- | plugins/pychrysalide/arch/processor.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/plugins/pychrysalide/arch/processor.c b/plugins/pychrysalide/arch/processor.c index 94ba7df..f356a91 100644 --- a/plugins/pychrysalide/arch/processor.c +++ b/plugins/pychrysalide/arch/processor.c @@ -208,6 +208,23 @@ static PyObject *py_arch_processor_new(PyTypeObject *type, PyObject *args, PyObj static void py_arch_processor_init_gclass(GArchProcessorClass *class, gpointer unused) { + GType type; /* Type d'instances concerné */ + GArchProcessor *pattern; /* Patron de données à copier */ + + type = G_TYPE_FROM_CLASS(class); + + pattern = get_dynamic_type_pattern(type); + + if (pattern != NULL) + { + /* + class->endianness = pattern->endianness; + class->memsize = pattern->memsize; + class->inssize = pattern->inssize; + class->virt_space = pattern->virt_space; + */ + } + class->get_ctx = py_arch_processor_get_context_wrapper; class->disassemble = py_arch_processor_disassemble_wrapper; @@ -230,20 +247,6 @@ static void py_arch_processor_init_gclass(GArchProcessorClass *class, gpointer u static void py_arch_processor_init_ginstance(GArchProcessor *proc, GArchProcessor *class) { - GType type; /* Type d'instances concerné */ - GArchProcessor *pattern; /* Patron de données à copier */ - - type = G_TYPE_FROM_INSTANCE(proc); - - pattern = get_dynamic_type_pattern(type); - - if (pattern != NULL) - { - proc->endianness = pattern->endianness; - proc->memsize = pattern->memsize; - proc->inssize = pattern->inssize; - proc->virt_space = pattern->virt_space; - } } @@ -294,10 +297,12 @@ static int py_arch_processor_init(PyObject *self, PyObject *args, PyObject *kwds proc = G_ARCH_PROCESSOR(pygobject_get(self)); + /* proc->endianness = endianness; proc->memsize = mem_size; proc->inssize = ins_min_size; proc->virt_space = vspace; + */ register_dynamic_type_pattern(G_OBJECT(proc)); |