diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-08-16 09:16:53 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-08-16 09:16:53 (GMT) |
commit | fb315963527f6412273829f09513325e446eb6c9 (patch) | |
tree | 361f19767812a8f758545e8daa2973fe0b3c9de7 /plugins/pychrysalide/arch | |
parent | 36945bffa2ca648b58c99905ebf9b1b536a9188a (diff) |
Reorganized the Python plugin code.
Diffstat (limited to 'plugins/pychrysalide/arch')
-rw-r--r-- | plugins/pychrysalide/arch/immediate.c | 32 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/immediate.h | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/instriter.c | 27 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/instriter.h | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/instruction.c | 28 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/instruction.h | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/module.c | 65 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/module.h | 7 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/operand.c | 22 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/operand.h | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/processor.c | 24 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/processor.h | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/raw.c | 24 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/raw.h | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/targetableop.c | 18 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/targetableop.h | 2 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/vmpa.c | 57 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/vmpa.h | 4 |
18 files changed, 206 insertions, 116 deletions
diff --git a/plugins/pychrysalide/arch/immediate.c b/plugins/pychrysalide/arch/immediate.c index e3c5c34..5ee2d41 100644 --- a/plugins/pychrysalide/arch/immediate.c +++ b/plugins/pychrysalide/arch/immediate.c @@ -36,6 +36,8 @@ #include "operand.h" +#include "targetableop.h" +#include "../access.h" #include "../helpers.h" @@ -674,21 +676,33 @@ PyTypeObject *get_python_imm_operand_type(void) * * ******************************************************************************/ -bool register_python_imm_operand(PyObject *module) +bool ensure_python_imm_operand_is_registered(void) { - PyTypeObject *py_imm_operand_type; /* Type Python 'BinContent' */ + PyTypeObject *type; /* Type Python 'ImmOperand' */ + PyObject *module; /* Module à recompléter */ PyObject *dict; /* Dictionnaire du module */ - py_imm_operand_type = get_python_imm_operand_type(); + type = get_python_imm_operand_type(); - dict = PyModule_GetDict(module); + if (!PyType_HasFeature(type, Py_TPFLAGS_READY)) + { + module = get_access_to_python_module("pychrysalide.arch"); + + dict = PyModule_GetDict(module); + + if (!ensure_python_arch_operand_is_registered()) + return false; - if (!register_class_for_pygobject(dict, G_TYPE_IMM_OPERAND, - py_imm_operand_type, get_python_arch_operand_type())) - return false; + if (!ensure_python_targetable_operand_is_registered()) + return false; - if (!py_imm_operand_define_constants(py_imm_operand_type)) - return false; + if (!register_class_for_pygobject(dict, G_TYPE_IMM_OPERAND, type, get_python_arch_operand_type())) + return false; + + if (!py_imm_operand_define_constants(type)) + return false; + + } return true; diff --git a/plugins/pychrysalide/arch/immediate.h b/plugins/pychrysalide/arch/immediate.h index 3c99b19..fd456e4 100644 --- a/plugins/pychrysalide/arch/immediate.h +++ b/plugins/pychrysalide/arch/immediate.h @@ -35,7 +35,7 @@ PyTypeObject *get_python_imm_operand_type(void); /* Prend en charge l'objet 'pychrysalide.arch.ImmOperand'. */ -bool register_python_imm_operand(PyObject *); +bool ensure_python_imm_operand_is_registered(void); diff --git a/plugins/pychrysalide/arch/instriter.c b/plugins/pychrysalide/arch/instriter.c index 244a825..f665cba 100644 --- a/plugins/pychrysalide/arch/instriter.c +++ b/plugins/pychrysalide/arch/instriter.c @@ -32,6 +32,7 @@ #include "processor.h" +#include "../access.h" @@ -258,19 +259,29 @@ PyTypeObject *get_python_instr_iterator_type(void) * * ******************************************************************************/ -bool register_python_instr_iterator(PyObject *module) +bool ensure_python_instr_iterator_is_registered(void) { - PyTypeObject *py_instr_iterator_type; /* Type Python 'BinContent' */ + PyTypeObject *type; /* Type Python 'InstrIterator' */ + PyObject *module; /* Module à recompléter */ int ret; /* Bilan d'un appel */ - py_instr_iterator_type = get_python_instr_iterator_type(); + type = get_python_instr_iterator_type(); - if (PyType_Ready(py_instr_iterator_type) < 0) - return false; + if (!PyType_HasFeature(type, Py_TPFLAGS_READY)) + { + if (PyType_Ready(type) < 0) + return false; + + module = get_access_to_python_module("pychrysalide.arch"); + + Py_INCREF(type); + ret = PyModule_AddObject(module, "InstrIterator", (PyObject *)type); - Py_INCREF(py_instr_iterator_type); - ret = PyModule_AddObject(module, "InstrIterator", (PyObject *)py_instr_iterator_type); + if (ret != 0) + return false; + + } - return (ret == 0); + return true; } diff --git a/plugins/pychrysalide/arch/instriter.h b/plugins/pychrysalide/arch/instriter.h index 3cb0e38..543d988 100644 --- a/plugins/pychrysalide/arch/instriter.h +++ b/plugins/pychrysalide/arch/instriter.h @@ -35,7 +35,7 @@ PyTypeObject *get_python_instr_iterator_type(void); /* Prend en charge l'objet 'pychrysalide.arch.InstrIterator'. */ -bool register_python_instr_iterator(PyObject *); +bool ensure_python_instr_iterator_is_registered(void); diff --git a/plugins/pychrysalide/arch/instruction.c b/plugins/pychrysalide/arch/instruction.c index d659c87..df5bc15 100644 --- a/plugins/pychrysalide/arch/instruction.c +++ b/plugins/pychrysalide/arch/instruction.c @@ -33,6 +33,7 @@ #include "vmpa.h" +#include "../access.h" #include "../helpers.h" #include "../glibext/linegen.h" @@ -498,23 +499,30 @@ PyTypeObject *get_python_arch_instruction_type(void) * * ******************************************************************************/ -bool register_python_arch_instruction(PyObject *module) +bool ensure_python_arch_instruction_is_registered(void) { - PyTypeObject *py_arch_instruction_type; /* Type Python 'ArchInstruc...'*/ + PyTypeObject *type; /* Type Python 'ArchInstruc...'*/ + PyObject *module; /* Module à recompléter */ PyObject *dict; /* Dictionnaire du module */ - PyTypeObject *py_line_generator_type; /* Type Python 'LineGenerator' */ - py_arch_instruction_type = get_python_arch_instruction_type(); + type = get_python_arch_instruction_type(); - APPLY_ABSTRACT_FLAG(py_arch_instruction_type); + if (!PyType_HasFeature(type, Py_TPFLAGS_READY)) + { + APPLY_ABSTRACT_FLAG(type); + + module = get_access_to_python_module("pychrysalide.arch"); - dict = PyModule_GetDict(module); + dict = PyModule_GetDict(module); - py_line_generator_type = get_python_line_generator_type(); + if (!ensure_python_line_generator_is_registered()) + return false; - if (!_register_class_for_pygobject(dict, G_TYPE_ARCH_INSTRUCTION, py_arch_instruction_type, - &PyGObject_Type, py_line_generator_type, NULL)) - return false; + if (!_register_class_for_pygobject(dict, G_TYPE_ARCH_INSTRUCTION, type, + &PyGObject_Type, get_python_line_generator_type(), NULL)) + return false; + + } return true; diff --git a/plugins/pychrysalide/arch/instruction.h b/plugins/pychrysalide/arch/instruction.h index ef1f598..5433222 100644 --- a/plugins/pychrysalide/arch/instruction.h +++ b/plugins/pychrysalide/arch/instruction.h @@ -35,7 +35,7 @@ PyTypeObject *get_python_arch_instruction_type(void); /* Prend en charge l'objet 'pychrysalide.arch.ArchInstruction'. */ -bool register_python_arch_instruction(PyObject *); +bool ensure_python_arch_instruction_is_registered(void); diff --git a/plugins/pychrysalide/arch/module.c b/plugins/pychrysalide/arch/module.c index 406b78c..c81a762 100644 --- a/plugins/pychrysalide/arch/module.c +++ b/plugins/pychrysalide/arch/module.c @@ -39,7 +39,6 @@ #include "raw.h" #include "targetableop.h" #include "vmpa.h" -#include "../access.h" #include "../helpers.h" @@ -94,21 +93,20 @@ static bool py_base_define_constants(PyTypeObject *obj_type) /****************************************************************************** * * -* Paramètres : module = module dont la définition est à compléter. * +* Paramètres : super = module dont la définition est à compléter. * * * -* Description : Ajoute le module 'arch' au module Python. * +* Description : Ajoute le module 'arch' à un module Python. * * * -* Retour : - * +* Retour : Bilan de l'opération. * * * * Remarques : - * * * ******************************************************************************/ -bool add_arch_module_to_python_module(PyObject *super) +bool add_arch_module(PyObject *super) { bool result; /* Bilan à retourner */ PyObject *module; /* Sous-module mis en place */ - int ret; /* Bilan d'un appel */ static PyModuleDef py_chrysalide_arch_module = { @@ -121,41 +119,44 @@ bool add_arch_module_to_python_module(PyObject *super) }; - result = false; + module = build_python_module(super, &py_chrysalide_arch_module); - module = PyModule_Create(&py_chrysalide_arch_module); - if (module == NULL) return false; + result = (module != NULL); - ret = PyState_AddModule(super, &py_chrysalide_arch_module); - if (ret != 0) goto loading_failed; + if (result) result = py_base_define_constants(Py_TYPE(module)); - ret = _PyImport_FixupBuiltin(module, "pychrysalide.arch"); - if (ret != 0) goto loading_failed; - - Py_INCREF(module); - ret = PyModule_AddObject(super, "arch", module); - if (ret != 0) goto loading_failed; - - result = true; + return result; - result &= py_base_define_constants(Py_TYPE(module)); +} - result &= register_python_targetable_operand(module); - result &= register_python_arch_instruction(module); - result &= register_python_arch_operand(module); - result &= register_python_arch_processor(module); - result &= register_python_instr_iterator(module); - result &= register_python_raw_instruction(module); - result &= register_python_vmpa(module); - result &= register_python_mrange(module); +/****************************************************************************** +* * +* Paramètres : - * +* * +* Description : Intègre les objets du module 'arch'. * +* * +* Retour : Bilan de l'opération. * +* * +* Remarques : - * +* * +******************************************************************************/ - result &= register_python_imm_operand(module); +bool populate_arch_module(void) +{ + bool result; /* Bilan à retourner */ - if (result) - register_access_to_python_module("pychrysalide.arch", module); + result = true; - loading_failed: + if (result) result = ensure_python_imm_operand_is_registered(); + if (result) result = ensure_python_instr_iterator_is_registered(); + if (result) result = ensure_python_arch_instruction_is_registered(); + if (result) result = ensure_python_arch_operand_is_registered(); + if (result) result = ensure_python_arch_processor_is_registered(); + if (result) result = ensure_python_raw_instruction_is_registered(); + if (result) result = ensure_python_targetable_operand_is_registered(); + if (result) result = ensure_python_vmpa_is_registered(); + if (result) result = ensure_python_mrange_is_registered(); assert(result); diff --git a/plugins/pychrysalide/arch/module.h b/plugins/pychrysalide/arch/module.h index 07d3575..b4cde0e 100644 --- a/plugins/pychrysalide/arch/module.h +++ b/plugins/pychrysalide/arch/module.h @@ -31,8 +31,11 @@ -/* Ajoute le module 'arch' au module Python. */ -bool add_arch_module_to_python_module(PyObject *); +/* Ajoute le module 'arch' à un module Python. */ +bool add_arch_module(PyObject *); + +/* Intègre les objets du module 'arch'. */ +bool populate_arch_module(void); diff --git a/plugins/pychrysalide/arch/operand.c b/plugins/pychrysalide/arch/operand.c index 427f92b..e464eac 100644 --- a/plugins/pychrysalide/arch/operand.c +++ b/plugins/pychrysalide/arch/operand.c @@ -31,6 +31,7 @@ #include <arch/operand.h> +#include "../access.h" #include "../helpers.h" @@ -90,19 +91,26 @@ PyTypeObject *get_python_arch_operand_type(void) * * ******************************************************************************/ -bool register_python_arch_operand(PyObject *module) +bool ensure_python_arch_operand_is_registered(void) { - PyTypeObject *py_arch_operand_type; /* Type Python 'BinContent' */ + PyTypeObject *type; /* Type Python 'ArchOperand' */ + PyObject *module; /* Module à recompléter */ PyObject *dict; /* Dictionnaire du module */ - py_arch_operand_type = get_python_arch_operand_type(); + type = get_python_arch_operand_type(); - APPLY_ABSTRACT_FLAG(py_arch_operand_type); + if (!PyType_HasFeature(type, Py_TPFLAGS_READY)) + { + APPLY_ABSTRACT_FLAG(type); - dict = PyModule_GetDict(module); + module = get_access_to_python_module("pychrysalide.arch"); - if (!register_class_for_pygobject(dict, G_TYPE_ARCH_OPERAND, py_arch_operand_type, &PyGObject_Type)) - return false; + dict = PyModule_GetDict(module); + + if (!register_class_for_pygobject(dict, G_TYPE_ARCH_OPERAND, type, &PyGObject_Type)) + return false; + + } return true; diff --git a/plugins/pychrysalide/arch/operand.h b/plugins/pychrysalide/arch/operand.h index 3ee7ed1..a718d8f 100644 --- a/plugins/pychrysalide/arch/operand.h +++ b/plugins/pychrysalide/arch/operand.h @@ -35,7 +35,7 @@ PyTypeObject *get_python_arch_operand_type(void); /* Prend en charge l'objet 'pychrysalide.arch.ArchOperand'. */ -bool register_python_arch_operand(PyObject *); +bool ensure_python_arch_operand_is_registered(void); diff --git a/plugins/pychrysalide/arch/processor.c b/plugins/pychrysalide/arch/processor.c index c2ee530..3ac18fa 100644 --- a/plugins/pychrysalide/arch/processor.c +++ b/plugins/pychrysalide/arch/processor.c @@ -38,6 +38,7 @@ #include "instriter.h" #include "instruction.h" #include "vmpa.h" +#include "../access.h" #include "../helpers.h" @@ -489,20 +490,27 @@ PyTypeObject *get_python_arch_processor_type(void) * * ******************************************************************************/ -bool register_python_arch_processor(PyObject *module) +bool ensure_python_arch_processor_is_registered(void) { - PyTypeObject *py_arch_processor_type; /* Type Python 'BinContent' */ + PyTypeObject *type; /* Type Python 'ArchProcessor' */ + PyObject *module; /* Module à recompléter */ PyObject *dict; /* Dictionnaire du module */ - py_arch_processor_type = get_python_arch_processor_type(); + type = get_python_arch_processor_type(); - dict = PyModule_GetDict(module); + if (!PyType_HasFeature(type, Py_TPFLAGS_READY)) + { + module = get_access_to_python_module("pychrysalide.arch"); + + dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_ARCH_PROCESSOR, py_arch_processor_type, &PyGObject_Type)) - return false; + if (!register_class_for_pygobject(dict, G_TYPE_ARCH_PROCESSOR, type, &PyGObject_Type)) + return false; - if (!define_python_arch_processor_constants(py_arch_processor_type)) - return false; + if (!define_python_arch_processor_constants(type)) + return false; + + } return true; diff --git a/plugins/pychrysalide/arch/processor.h b/plugins/pychrysalide/arch/processor.h index ff6ccb3..2db8950 100644 --- a/plugins/pychrysalide/arch/processor.h +++ b/plugins/pychrysalide/arch/processor.h @@ -35,7 +35,7 @@ PyTypeObject *get_python_arch_processor_type(void); /* Prend en charge l'objet 'pychrysalide.arch.ArchProcessor'. */ -bool register_python_arch_processor(PyObject *); +bool ensure_python_arch_processor_is_registered(void); diff --git a/plugins/pychrysalide/arch/raw.c b/plugins/pychrysalide/arch/raw.c index 39b5fe7..318eb6b 100644 --- a/plugins/pychrysalide/arch/raw.c +++ b/plugins/pychrysalide/arch/raw.c @@ -32,6 +32,7 @@ #include "instruction.h" +#include "../access.h" #include "../helpers.h" @@ -243,20 +244,27 @@ PyTypeObject *get_python_raw_instruction_type(void) * * ******************************************************************************/ -bool register_python_raw_instruction(PyObject *module) +bool ensure_python_raw_instruction_is_registered(void) { - PyTypeObject *py_raw_instruction_type; /* Type Python 'RawInstruction'*/ + PyTypeObject *type; /* Type Python 'RawInstruction'*/ + PyObject *module; /* Module à recompléter */ PyObject *dict; /* Dictionnaire du module */ - PyTypeObject *base; /* Base parente pour héritage */ - py_raw_instruction_type = get_python_raw_instruction_type(); + type = get_python_raw_instruction_type(); - dict = PyModule_GetDict(module); + if (!PyType_HasFeature(type, Py_TPFLAGS_READY)) + { + module = get_access_to_python_module("pychrysalide.arch"); - base = get_python_arch_instruction_type(); + dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_RAW_INSTRUCTION, py_raw_instruction_type, base)) - return false; + if (!ensure_python_arch_instruction_is_registered()) + return false; + + if (!register_class_for_pygobject(dict, G_TYPE_RAW_INSTRUCTION, type, get_python_arch_instruction_type())) + return false; + + } return true; diff --git a/plugins/pychrysalide/arch/raw.h b/plugins/pychrysalide/arch/raw.h index 32c4e2d..552db41 100644 --- a/plugins/pychrysalide/arch/raw.h +++ b/plugins/pychrysalide/arch/raw.h @@ -35,7 +35,7 @@ PyTypeObject *get_python_raw_instruction_type(void); /* Prend en charge l'objet 'pychrysalide.arch.RawInstruction'. */ -bool register_python_raw_instruction(PyObject *); +bool ensure_python_raw_instruction_is_registered(void); diff --git a/plugins/pychrysalide/arch/targetableop.c b/plugins/pychrysalide/arch/targetableop.c index 8951492..0fb23e0 100644 --- a/plugins/pychrysalide/arch/targetableop.c +++ b/plugins/pychrysalide/arch/targetableop.c @@ -37,6 +37,7 @@ #include "processor.h" #include "vmpa.h" +#include "../access.h" #include "../format/format.h" @@ -163,15 +164,22 @@ PyTypeObject *get_python_targetable_operand_type(void) * * ******************************************************************************/ -bool register_python_targetable_operand(PyObject *module) +bool ensure_python_targetable_operand_is_registered(void) { - PyTypeObject *py_targetable_operand_type; /* Type 'TargetableOperand' */ + PyTypeObject *type; /* Type 'TargetableOperand' */ + PyObject *module; /* Module à recompléter */ PyObject *dict; /* Dictionnaire du module */ - py_targetable_operand_type = get_python_targetable_operand_type(); + type = get_python_targetable_operand_type(); - dict = PyModule_GetDict(module); - pyg_register_interface(dict, "TargetableOperand", G_TYPE_TARGETABLE_OPERAND, py_targetable_operand_type); + if (!PyType_HasFeature(type, Py_TPFLAGS_READY)) + { + module = get_access_to_python_module("pychrysalide.arch"); + + dict = PyModule_GetDict(module); + pyg_register_interface(dict, "TargetableOperand", G_TYPE_TARGETABLE_OPERAND, type); + + } return true; diff --git a/plugins/pychrysalide/arch/targetableop.h b/plugins/pychrysalide/arch/targetableop.h index d79bb87..4c41a4d 100644 --- a/plugins/pychrysalide/arch/targetableop.h +++ b/plugins/pychrysalide/arch/targetableop.h @@ -35,7 +35,7 @@ PyTypeObject *get_python_targetable_operand_type(void); /* Prend en charge l'objet 'pychrysalide.arch.TargetableOperand'. */ -bool register_python_targetable_operand(PyObject *); +bool ensure_python_targetable_operand_is_registered(void); diff --git a/plugins/pychrysalide/arch/vmpa.c b/plugins/pychrysalide/arch/vmpa.c index 39b5cef..883491f 100644 --- a/plugins/pychrysalide/arch/vmpa.c +++ b/plugins/pychrysalide/arch/vmpa.c @@ -32,6 +32,7 @@ #include <i18n.h> +#include "../access.h" #include "../helpers.h" @@ -678,23 +679,33 @@ PyTypeObject *get_python_vmpa_type(void) * * ******************************************************************************/ -bool register_python_vmpa(PyObject *module) +bool ensure_python_vmpa_is_registered(void) { - PyTypeObject *py_vmpa_type; /* Type Python pour 'vmpa' */ + PyTypeObject *type; /* Type Python pour 'vmpa' */ + PyObject *module; /* Module à recompléter */ int ret; /* Bilan d'un appel */ - py_vmpa_type = get_python_vmpa_type(); + type = get_python_vmpa_type(); + + if (!PyType_HasFeature(type, Py_TPFLAGS_READY)) + { + if (PyType_Ready(type) != 0) + return false; + + if (!py_vmpa_define_constants(type)) + return false; + + module = get_access_to_python_module("pychrysalide.arch"); - if (PyType_Ready(py_vmpa_type) != 0) - return false; + Py_INCREF(type); + ret = PyModule_AddObject(module, "vmpa", (PyObject *)type); - if (!py_vmpa_define_constants(py_vmpa_type)) - return false; + if (ret != 0) + return false; - Py_INCREF(py_vmpa_type); - ret = PyModule_AddObject(module, "vmpa", (PyObject *)py_vmpa_type); + } - return (ret == 0); + return true; } @@ -1234,20 +1245,30 @@ PyTypeObject *get_python_mrange_type(void) * * ******************************************************************************/ -bool register_python_mrange(PyObject *module) +bool ensure_python_mrange_is_registered(void) { - PyTypeObject *py_mrange_type; /* Type Python pour 'mrange' */ + PyTypeObject *type; /* Type Python pour 'mrange' */ + PyObject *module; /* Module à recompléter */ int ret; /* Bilan d'un appel */ - py_mrange_type = get_python_mrange_type(); + type = get_python_mrange_type(); + + if (!PyType_HasFeature(type, Py_TPFLAGS_READY)) + { + if (PyType_Ready(type) != 0) + return false; - if (PyType_Ready(py_mrange_type) != 0) - return false; + module = get_access_to_python_module("pychrysalide.arch"); - Py_INCREF(py_mrange_type); - ret = PyModule_AddObject(module, "mrange", (PyObject *)py_mrange_type); + Py_INCREF(type); + ret = PyModule_AddObject(module, "mrange", (PyObject *)type); + + if (ret != 0) + return false; + + } - return (ret == 0); + return true; } diff --git a/plugins/pychrysalide/arch/vmpa.h b/plugins/pychrysalide/arch/vmpa.h index 46828f5..7705a10 100644 --- a/plugins/pychrysalide/arch/vmpa.h +++ b/plugins/pychrysalide/arch/vmpa.h @@ -38,7 +38,7 @@ PyTypeObject *get_python_vmpa_type(void); /* Prend en charge l'objet 'pychrysalide.arch.vmpa'. */ -bool register_python_vmpa(PyObject *); +bool ensure_python_vmpa_is_registered(void); /* Donne accès au coeur d'un objet 'pychrysalide.arch.vmpa'. */ vmpa2t *get_internal_vmpa(PyObject *); @@ -58,7 +58,7 @@ int convert_any_to_vmpa(PyObject *, void *); PyTypeObject *get_python_mrange_type(void); /* Prend en charge l'objet 'pychrysalide.arch.mrange'. */ -bool register_python_mrange(PyObject *); +bool ensure_python_mrange_is_registered(void); /* Donne accès au coeur d'un objet 'pychrysalide.arch.mrange'. */ mrange_t *get_internal_mrange(PyObject *); |