Index: /trunk/src/libs/xpcom18a4/python/Makefile.kmk
===================================================================
--- /trunk/src/libs/xpcom18a4/python/Makefile.kmk	(revision 70576)
+++ /trunk/src/libs/xpcom18a4/python/Makefile.kmk	(revision 70577)
@@ -125,4 +125,8 @@
 	$(PATH_STAGE_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
 
+# pymalloc abi variant.
+VBoxPythonBase_m_EXTENDS    = VBoxPythonBase
+VBoxPythonBase_m_DEFS       = MODULE_NAME_SUFFIX=m $(VBoxPythonBase_DEFS)
+
 # 32-bit base.
 VBoxPythonBase_x86_TEMPLATE = XPCOM-x86
@@ -133,4 +137,8 @@
 	$(PATH_STAGE_BIN)/VBoxXPCOM-x86$(VBOX_SUFF_DLL)
 
+# 32-bit pymalloc abi variant.
+VBoxPythonBase_x86_m_EXTENDS    = VBoxPythonBase_x86
+VBoxPythonBase_x86_m_DEFS       = MODULE_NAME_SUFFIX=_x86m $(VBoxPythonBase_DEFS)
+
 
 ifdef VBOX_PYTHON26_INC
@@ -231,14 +239,15 @@
 #
 DLLS += VBoxPython3_2m
-VBoxPython3_2m_EXTENDS    = VBoxPythonBase
+VBoxPython3_2m_EXTENDS    = VBoxPythonBase_m
 VBoxPython3_2m_EXTENDS_BY = appending
 VBoxPython3_2m_TEMPLATE   = XPCOM
 VBoxPython3_2m_INCS       = $(VBOX_PYTHON32M_INC)
 VBoxPython3_2m_LIBS       = $(VBOX_PYTHON32M_LIB)
+VBoxPython3_2m_DEFS       = MODULE_NAME_SUFFIX
 
  ifdef VBOX_WITH_32_ON_64_MAIN_API
   ifdef VBOX_PYTHON32M_LIB_X86
 DLLS += VBoxPython3_2m_x86
-VBoxPython3_2m_x86_EXTENDS    = VBoxPythonBase_x86
+VBoxPython3_2m_x86_EXTENDS    = VBoxPythonBase_x86_m
 VBoxPython3_2m_x86_EXTENDS_BY = appending
 VBoxPython3_2m_x86_TEMPLATE   = XPCOM
@@ -277,5 +286,5 @@
 #
 DLLS += VBoxPython3_3m
-VBoxPython3_3m_EXTENDS    = VBoxPythonBase
+VBoxPython3_3m_EXTENDS    = VBoxPythonBase_m
 VBoxPython3_3m_EXTENDS_BY = appending
 VBoxPython3_3m_TEMPLATE   = XPCOM
@@ -286,5 +295,5 @@
   ifdef VBOX_PYTHON33M_LIB_X86
 DLLS += VBoxPython3_3m_x86
-VBoxPython3_3m_x86_EXTENDS    = VBoxPythonBase_x86
+VBoxPython3_3m_x86_EXTENDS    = VBoxPythonBase_x86_m
 VBoxPython3_3m_x86_EXTENDS_BY = appending
 VBoxPython3_3m_x86_TEMPLATE   = XPCOM
@@ -323,5 +332,5 @@
 #
 DLLS += VBoxPython3_4m
-VBoxPython3_4m_EXTENDS    = VBoxPythonBase
+VBoxPython3_4m_EXTENDS    = VBoxPythonBase_m
 VBoxPython3_4m_EXTENDS_BY = appending
 VBoxPython3_4m_TEMPLATE   = XPCOM
@@ -332,5 +341,5 @@
   ifdef VBOX_PYTHON34M_LIB_X86
 DLLS += VBoxPython3_4m_x86
-VBoxPython3_4m_x86_EXTENDS    = VBoxPythonBase_x86
+VBoxPython3_4m_x86_EXTENDS    = VBoxPythonBase_x86_m
 VBoxPython3_4m_x86_EXTENDS_BY = appending
 VBoxPython3_4m_x86_TEMPLATE   = XPCOM
@@ -369,5 +378,5 @@
 #
 DLLS += VBoxPython3_5m
-VBoxPython3_5m_EXTENDS    = VBoxPythonBase
+VBoxPython3_5m_EXTENDS    = VBoxPythonBase_m
 VBoxPython3_5m_EXTENDS_BY = appending
 VBoxPython3_5m_TEMPLATE   = XPCOM
@@ -378,5 +387,5 @@
   ifdef VBOX_PYTHON35M_LIB_X86
 DLLS += VBoxPython3_5m_x86
-VBoxPython3_5m_x86_EXTENDS    = VBoxPythonBase_x86
+VBoxPython3_5m_x86_EXTENDS    = VBoxPythonBase_x86_m
 VBoxPython3_5m_x86_EXTENDS_BY = appending
 VBoxPython3_5m_x86_TEMPLATE   = XPCOM
@@ -415,5 +424,5 @@
 #
 DLLS += VBoxPython3_6m
-VBoxPython3_6m_EXTENDS    = VBoxPythonBase
+VBoxPython3_6m_EXTENDS    = VBoxPythonBase_m
 VBoxPython3_6m_EXTENDS_BY = appending
 VBoxPython3_6m_TEMPLATE   = XPCOM
@@ -424,5 +433,5 @@
   ifdef VBOX_PYTHON36M_LIB_X86
 DLLS += VBoxPython3_6m_x86
-VBoxPython3_6m_x86_EXTENDS    = VBoxPythonBase_x86
+VBoxPython3_6m_x86_EXTENDS    = VBoxPythonBase_x86_m
 VBoxPython3_6m_x86_EXTENDS_BY = appending
 VBoxPython3_6m_x86_TEMPLATE   = XPCOM
@@ -461,5 +470,5 @@
 #
 DLLS += VBoxPython3_7m
-VBoxPython3_7m_EXTENDS    = VBoxPythonBase
+VBoxPython3_7m_EXTENDS    = VBoxPythonBase_m
 VBoxPython3_7m_EXTENDS_BY = appending
 VBoxPython3_7m_TEMPLATE   = XPCOM
@@ -470,7 +479,7 @@
   ifdef VBOX_PYTHON37M_LIB_X86
 DLLS += VBoxPython3_7m_x86
-VBoxPython3_7m_x86_EXTENDS    = VBoxPythonBase_x86
+VBoxPython3_7m_x86_EXTENDS    = VBoxPythonBase_x86_m
 VBoxPython3_7m_x86_EXTENDS_BY = appending
-VBoxPython3_7m_x86_TEMPLATE   = XPCOM
+VBoxPython3_7m_x86_TEMPLATE_   = XPCOM
 VBoxPython3_7m_x86_INCS       = $(VBOX_PYTHON37M_INC)
 VBoxPython3_7m_x86_LIBS       = $(VBOX_PYTHON37M_LIB_X86)
Index: /trunk/src/libs/xpcom18a4/python/src/VariantUtils.cpp
===================================================================
--- /trunk/src/libs/xpcom18a4/python/src/VariantUtils.cpp	(revision 70576)
+++ /trunk/src/libs/xpcom18a4/python/src/VariantUtils.cpp	(revision 70577)
@@ -97,11 +97,11 @@
 	src = PyString_AS_STRING(s) + 2;
 #else
-    if (!PyBytes_Check(obj))
+    if (!PyBytes_Check(s))
     {
         PyErr_SetString(PyExc_TypeError, "internal error in PyXPCOM, parameter must be a bytes object");
         return -1;
     }
-    size = (PyBytes_GET_SIZE(obj) - 2) / sizeof(PRUnichar);
-    src = PyBytes_AS_STRING(obj) + 2;
+    size = (PyBytes_GET_SIZE(s) - 2) / sizeof(PRUnichar);
+    src = PyBytes_AS_STRING(s) + 2;
 #endif
 	dest = (PRUnichar *)nsMemory::Alloc(sizeof(PRUnichar) * (size + 1));
