|
@@ -2083,7 +2083,11 @@ PyObject *PyXPCOM_InterfaceVariantHelper::MakeSinglePythonResult(int index)
|
|
|
case nsXPTType::T_WCHAR:
|
|
|
ret = PyUnicode_FromPRUnichar( ((PRUnichar *)ns_v.ptr), 1 );
|
|
|
break;
|
|
|
-// case nsXPTType::T_VOID:
|
|
|
+ case nsXPTType::T_VOID:
|
|
|
+ // we really can't do anything useful with this; just pass it to
|
|
|
+ // Python as an integer and hope it's close enough
|
|
|
+ ret = PyLong_FromVoidPtr( *((void **)ns_v.ptr));
|
|
|
+ break;
|
|
|
case nsXPTType::T_IID: {
|
|
|
// guard against null IIDs
|
|
|
nsIID* iid = *reinterpret_cast<nsIID**>(ns_v.ptr);
|
|
@@ -2562,11 +2566,7 @@ PyObject *PyXPCOM_GatewayVariantHelper::MakeSingleParam(int index, PythonTypeDes
|
|
|
ret = PyUnicode_FromPRUnichar(&temp, 1);
|
|
|
break;
|
|
|
}
|
|
|
- case nsXPTType::T_VOID:
|
|
|
- // we really can't do anything useful with this; just pass it to
|
|
|
- // Python as an integer and hope it's close enough
|
|
|
- ret = PyLong_FromVoidPtr( *((void **)ns_v.ptr));
|
|
|
- break;
|
|
|
+// case nsXPTType::T_VOID:
|
|
|
case nsXPTType::T_IID: {
|
|
|
ret = Py_nsIID::PyObjectFromIID( * DEREF_IN_OR_OUT(ns_v.val.p, const nsIID *) );
|
|
|
break;
|