summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch/vmpa.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/arch/vmpa.c')
-rw-r--r--plugins/pychrysalide/arch/vmpa.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/plugins/pychrysalide/arch/vmpa.c b/plugins/pychrysalide/arch/vmpa.c
index 20784cd..5162fac 100644
--- a/plugins/pychrysalide/arch/vmpa.c
+++ b/plugins/pychrysalide/arch/vmpa.c
@@ -824,13 +824,23 @@ PyObject *build_from_internal_vmpa(const vmpa2t *addr)
PyTypeObject *type; /* Type à instancier */
PyObject *args; /* Liste des arguments d'appel */
- type = get_python_vmpa_type();
+ if (get_phy_addr(addr) == VMPA_NO_PHYSICAL && get_virt_addr(addr) == VMPA_NO_VIRTUAL)
+ {
+ result = Py_None;
+ Py_INCREF(result);
+ }
+
+ else
+ {
+ type = get_python_vmpa_type();
- args = Py_BuildValue("KK", get_phy_addr(addr), get_virt_addr(addr));
+ args = Py_BuildValue("KK", get_phy_addr(addr), get_virt_addr(addr));
- result = PyObject_CallObject((PyObject *)type, args);
+ result = PyObject_CallObject((PyObject *)type, args);
- Py_DECREF(args);
+ Py_DECREF(args);
+
+ }
return result;